Menu Close

An-n-digit-decimal-number-has-been-conveerted-into-octal-number-Say-it-has-m-digits-What-are-possible-minimum-and-maximum-values-of-m-in-terms-of-n-




Question Number 35072 by Rasheed.Sindhi last updated on 15/May/18
An n-digit decimal number has been  conveerted into octal number.Say it  has m digits.What are possible  minimum   and maximum values of m in terms of  n?
$$\mathrm{An}\:\mathrm{n}-\mathrm{digit}\:\mathrm{decimal}\:\mathrm{number}\:\mathrm{has}\:\mathrm{been} \\ $$$$\mathrm{conveerted}\:\mathrm{into}\:\mathrm{octal}\:\mathrm{number}.\mathrm{Say}\:\mathrm{it} \\ $$$$\mathrm{has}\:\mathrm{m}\:\mathrm{digits}.\mathrm{What}\:\mathrm{are}\:\mathrm{possible}\:\:\mathrm{minimum}\: \\ $$$$\mathrm{and}\:\mathrm{maximum}\:\mathrm{values}\:\mathrm{of}\:\mathrm{m}\:\mathrm{in}\:\mathrm{terms}\:\mathrm{of} \\ $$$$\mathrm{n}? \\ $$
Commented by candre last updated on 15/May/18
min⇒num=10^(n−1)   min=⌊log_8 (10^(n−1) )⌋+1=⌊(n−1)log_8 10⌋+1  max⇒num=10^n −1  max=⌊log_8 (10^n −1)⌋+1
$${min}\Rightarrow{num}=\mathrm{10}^{{n}−\mathrm{1}} \\ $$$${min}=\lfloor\mathrm{log}_{\mathrm{8}} \left(\mathrm{10}^{{n}−\mathrm{1}} \right)\rfloor+\mathrm{1}=\lfloor\left({n}−\mathrm{1}\right)\mathrm{log}_{\mathrm{8}} \mathrm{10}\rfloor+\mathrm{1} \\ $$$${max}\Rightarrow{num}=\mathrm{10}^{{n}} −\mathrm{1} \\ $$$${max}=\lfloor\mathrm{log}_{\mathrm{8}} \left(\mathrm{10}^{{n}} −\mathrm{1}\right)\rfloor+\mathrm{1} \\ $$
Commented by Rasheed.Sindhi last updated on 15/May/18
ThαnkS a lot Sir!
$$\mathcal{T}{h}\alpha{nk}\mathcal{S}\:{a}\:{lot}\:{Sir}! \\ $$

Leave a Reply

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