Menu Close

A-20-digit-decimal-number-has-been-converted-into-octal-system-Say-it-has-n-digits-What-can-be-minimum-and-maximum-possible-values-of-n-




Question Number 35071 by Rasheed.Sindhi last updated on 15/May/18
A 20-digit decimal number has been  converted into octal system.Say it has   n digits. What can be minimum and  maximum possible values of n?
$$\mathrm{A}\:\mathrm{20}-\mathrm{digit}\:\mathrm{decimal}\:\mathrm{number}\:\mathrm{has}\:\mathrm{been} \\ $$$$\mathrm{converted}\:\mathrm{into}\:\mathrm{octal}\:\mathrm{system}.\mathrm{Say}\:\mathrm{it}\:\mathrm{has}\: \\ $$$$\mathrm{n}\:\mathrm{digits}.\:\mathrm{What}\:\mathrm{can}\:\mathrm{be}\:\mathrm{minimum}\:\mathrm{and} \\ $$$$\mathrm{maximum}\:\mathrm{possible}\:\mathrm{values}\:\mathrm{of}\:\mathrm{n}? \\ $$$$ \\ $$
Answered by candre last updated on 15/May/18
m=lα^k +d;0<l≤α−1∧0≤d<α^k ∧(l,d,k,α)∈N^4 ∧α>1  m=(l+dα^(−k) )α^k   log_α m=log_α [(l+dα^(−k) )α^k ]  =log_α α^k +log_α (l+dα^(−k) )  =klog_α α+log_α (l+dα^(−k) )  =k+log_α (l+dα^(−k) )  0≤d<α^k ⇒0≤dα^(−k) <1  0<l+dα^(−k) <α  log_α (l+dα^(−k) )<1  α^k ≤m<α^(k+1) ⇒k≤log_α m<k+1  m=a_k ...a_0 ⇒k−0+1=k+1  min⇒num=10^(19)   min=⌊log_8 10^(19) ⌋+1=⌊19log_8 10⌋+1=22  max⇒num=10^(20) −1  max=⌊log_8 (10^(20) −1)⌋+1=23
$${m}={l}\alpha^{{k}} +{d};\mathrm{0}<{l}\leqslant\alpha−\mathrm{1}\wedge\mathrm{0}\leqslant{d}<\alpha^{{k}} \wedge\left({l},{d},{k},\alpha\right)\in\mathbb{N}^{\mathrm{4}} \wedge\alpha>\mathrm{1} \\ $$$${m}=\left({l}+{d}\alpha^{−{k}} \right)\alpha^{{k}} \\ $$$$\mathrm{log}_{\alpha} {m}=\mathrm{log}_{\alpha} \left[\left({l}+{d}\alpha^{−{k}} \right)\alpha^{{k}} \right] \\ $$$$=\mathrm{log}_{\alpha} \alpha^{{k}} +\mathrm{log}_{\alpha} \left({l}+{d}\alpha^{−{k}} \right) \\ $$$$={k}\mathrm{log}_{\alpha} \alpha+\mathrm{log}_{\alpha} \left({l}+{d}\alpha^{−{k}} \right) \\ $$$$={k}+\mathrm{log}_{\alpha} \left({l}+{d}\alpha^{−{k}} \right) \\ $$$$\mathrm{0}\leqslant{d}<\alpha^{{k}} \Rightarrow\mathrm{0}\leqslant{d}\alpha^{−{k}} <\mathrm{1} \\ $$$$\mathrm{0}<{l}+{d}\alpha^{−{k}} <\alpha \\ $$$$\mathrm{log}_{\alpha} \left({l}+{d}\alpha^{−{k}} \right)<\mathrm{1} \\ $$$$\alpha^{{k}} \leqslant{m}<\alpha^{{k}+\mathrm{1}} \Rightarrow{k}\leqslant\mathrm{log}_{\alpha} {m}<{k}+\mathrm{1} \\ $$$${m}={a}_{{k}} …{a}_{\mathrm{0}} \Rightarrow{k}−\mathrm{0}+\mathrm{1}={k}+\mathrm{1} \\ $$$${min}\Rightarrow{num}=\mathrm{10}^{\mathrm{19}} \\ $$$${min}=\lfloor\mathrm{log}_{\mathrm{8}} \mathrm{10}^{\mathrm{19}} \rfloor+\mathrm{1}=\lfloor\mathrm{19log}_{\mathrm{8}} \mathrm{10}\rfloor+\mathrm{1}=\mathrm{22} \\ $$$${max}\Rightarrow{num}=\mathrm{10}^{\mathrm{20}} −\mathrm{1} \\ $$$${max}=\lfloor\mathrm{log}_{\mathrm{8}} \left(\mathrm{10}^{\mathrm{20}} −\mathrm{1}\right)\rfloor+\mathrm{1}=\mathrm{23} \\ $$
Commented by Rasheed.Sindhi last updated on 15/May/18
†ђД₪k§ Д ℓø† §îЯ

Leave a Reply

Your email address will not be published. Required fields are marked *