mrtg
+ Reply to Thread
Results 1 to 15 of 27

Thread: Night Of The Living Brain Dead

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Posts
    122

    Question Night Of The Living Brain Dead

    Are there any sado-mathematicians a***rd?

    I have a riddle.

    If you convert a positive integer from base *0 into base B, how can you predict in advance exactly how many digits the base B integer result will have?

    For example, if I converted the base *0 integer *84*65270***227* into base 7, how many digits would that base 7 integer have?

    What if I converted it into base 2 or *6 instead of 7?

    What is the general rule for predicting, in advance, the number of base B digits in the converted integer?




    Please don't kill me.

    LOL
    Oh to be free, so blissfully free, of the ravages of intelligence, there is no greater joy! - The Cweationist's Cweed

    All that is necessary for evil to triumph is a good PR firm.
    Very funny, Scotty. Now beam down my clothes!

  2. #2
    Join Date
    Jan 2005
    Posts
    623
    Do you know the answer or are you trying to find the answer?
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  3. #3
    Join Date
    Aug 2007
    Posts
    122

    A Bad Case Of Digititis

    Quote Originally Posted by SyntaX****** View Post
    Do you know the answer or are you trying to find the answer?
    I know the answer.



    The rule is rather simple, but finding it can be tricky.

    It can be calculated directly without having to actually perform the conversion and count the digits.


    You don't even have to know what any of the digits in the converted value are going to be to predict the exact number of digits in it.


    EXAMPLES:
    The base *0 integer X = ** to the power of **7 would have **** digits.

    If converted to base 2, it would have *6*0 binary digits.

    If converted to base *6, it would have *2* hexadecimal digits.

    etc.


    HINT
    The number of digits required to express the integer part of any absolute value (whether integer or non-integer) in any valid base increases logarithmically.



    Spoiler
    If you give up, the answer can be found by selecting and highlighting the area between the lines.
    (The answer is written in the same colour as the background).
    ===============================================


    N = Positive base *0 integer
    B = The conversion base
    D = Number of base B digits in the converted integer

    Where:

    D = * + IntVal( log(N) / log(B) )

    Try it on some known values.

    ===============================================
    Last edited by JayT; 09-16-2007 at 10:43 PM.
    Oh to be free, so blissfully free, of the ravages of intelligence, there is no greater joy! - The Cweationist's Cweed

    All that is necessary for evil to triumph is a good PR firm.
    Very funny, Scotty. Now beam down my clothes!

  4. #4
    Join Date
    Aug 2007
    Posts
    122
    Quote Originally Posted by DANIEL2488 View Post
    Knowing automatically is pretty much impossible I believe. You can convert it though and in the middle of the process, you can pretty much get it, but that's still converting.
    It's not quite automatic, but it only takes a relatively simple computation to solve it. Far less work than actually doing the conversion.

    It was a lot harder to find the formula than to apply it once found.

    Oh to be free, so blissfully free, of the ravages of intelligence, there is no greater joy! - The Cweationist's Cweed

    All that is necessary for evil to triumph is a good PR firm.
    Very funny, Scotty. Now beam down my clothes!

  5. #5
    Join Date
    Jan 2005
    Posts
    623
    I'm definitely going to try to find it tomorrow. I wrote the base converter using logic, so I may be able to pull something out for this one. You did give a huge hint when you said Log, although I never understood logs in school. Our education system is based on memorization. The teachers are brilliant people, but not brilliant teachers if you know what I mean.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  6. #6
    Join Date
    Aug 2007
    Posts
    122

    Teachers &#*07*; Us

    Quote Originally Posted by SyntaX****** View Post
    I'm definitely going to try to find it tomorrow. I wrote the base converter using logic, so I may be able to pull something out for this one. You did give a huge hint when you said Log, although I never understood logs in school. Our education system is based on memorization. The teachers are brilliant people, but not brilliant teachers if you know what I mean.



    I'd like to strangle most teachers. I've had experience in that department.
    The art of genius it to take that which is complex and make it simpler.


    If you can do base conversions from logic and still do not understand logarithms, then that teacher deserves an F more than you do. It doesn't take a rocket scientist to understand them, but rocket scientists sure do use them a lot.
    LOL

    Logarithms are actually quite simple in concept, but teachers make it look difficult and mysterious in the extreme. I think they do it on purpose. It makes them look superior. (or so they think).





    Please allow me to provide a quick re*****er on basic logarithms:


    *0^* = *0 to the power of * = *0 &#2*5; *0 &#2*5; *0 = *000

    Therefore * is the base *0 logarithm of *000

    In other words, * is the power to which you raise *0 to get *000.

    When you log a table of values according to these rules, you have created a table of logarithms.

    Logarithm derives from the Greek words meaning in effect, nothing more than a table of numbers. (Logos + Arithmos) = (writing or logging of a) list of ratios or proportions (numbers).


    Let

    X^P = Y

    X = The base of the logarithm = The number to be raised to a power
    P = Power to which the base (X) is being raised
    Y = The result of X raised to the power P

    P = The base X logarithm of Y (can also be a non-integer)


    That's all logarithms are. The power (P) that some number or base (X) is raised to in order to obtain Y. They can be integers or non-integers.



    EXAMPLES

    *0&#*78; = *00, so 2 = base *0 log of *00

    *0&#*7*; = *000, so * = base *0 log of *000

    2&#*7*; = 8, so * = base 2 log of 8



    5 to the power of *.2*4 = 7.286668050**8*

    So, *.2*4 = base 5 log of 7.286668050**8*

    etc.

    It's more complex for non-integers, but the rules are still identical in any case.

    Logarithms have many practical uses once you get to know them.

    Before calculators and computers, logarithms helped scientists do complex computations much more quickly. In that context, they are obsolete now, but they are not as mysterious as the teachers would have you believe.
    Last edited by JayT; 09-16-2007 at 11:49 PM.
    Oh to be free, so blissfully free, of the ravages of intelligence, there is no greater joy! - The Cweationist's Cweed

    All that is necessary for evil to triumph is a good PR firm.
    Very funny, Scotty. Now beam down my clothes!

  7. #7
    Join Date
    Jan 2005
    Posts
    623
    Thanks for dusting off my brain on the subject! I guess I was using logs all along and never realised there was a definition for what I was doing.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  8. #8
    Join Date
    Sep 2005
    Posts
    2,050
    Quote Originally Posted by JayT View Post
    Are there any sado-mathematicians a***rd?

    I have a riddle.

    If you convert a positive integer from base *0 into base B, how can you predict in advance exactly how many digits the base B integer result will have?

    For example, if I converted the base *0 integer *84*65270***227* into base 7, how many digits would that base 7 integer have?

    What if I converted it into base 2 or *6 instead of 7?

    What is the general rule for predicting, in advance, the number of base B digits in the converted integer?
    Divide the decimal number by the target base squared?

    I haven't got enough time to think about this, but I didn't look down in the thread.

  9. #9
    Join Date
    Aug 2007
    Posts
    122

    Drain Bamage

    I gave the answer above in hidden text, but if you don't have time, I understand. I often have limited time too some days. Sounds like you have kids.
    Spare time? You gotta be kiddin!
    LOL



    Here's the solution to the general case:

    Let:
    N = Positive base *0 integer
    B = The conversion base (2 or greater)

    Then
    D = Number of base B digits in the converted integer

    Where:

    D = * + IntVal( log(N) / log(B) )

    In this case

    D = * + IntVal( Log(*84*65270***227*) / Log(7) ) = **


    With the above formula you can predict in advance the number of digits after the conversion into another base without knowing in advance what any of the digits will be until after you actually perform the conversion.


    In PHP, the code to solve the problem is simply

    Code:
    $N = *84*65270***227*;
    $B = 7;
    
    $D = * + IntVal( log($N) / log($B) );
    
    print $D; // = **
    or this code will also work equally well

    Code:
    $N = *84*65270***227*;
    $B = 7;
    
    $D = * + IntVal( log*0($N) / log*0($B) );
    
    print $D; // = **

    Math, years after school, is only for geeks who already have so much drain bamage that it doesn't matter anymore anyway.
    LOL


    .
    Oh to be free, so blissfully free, of the ravages of intelligence, there is no greater joy! - The Cweationist's Cweed

    All that is necessary for evil to triumph is a good PR firm.
    Very funny, Scotty. Now beam down my clothes!

  10. #10
    Join Date
    Sep 2005
    Posts
    2,050
    Quote Originally Posted by JayT View Post
    I gave the answer above in hidden text, but if you don't have time, I understand. I often have limited time too some days. Sounds like you have kids.
    Not quite. I'm only just over the age of sexual consent (as if that means shit to anybody...).

    I understood what you said (good explanation by the way), but I just took a random guess before I [ironically] left for school.

  11. #11
    Join Date
    Aug 2007
    Posts
    122

    Ventriloquism For Dummies - Vol. * of 72

    Quote Originally Posted by mike*5* View Post
    Not quite. I'm only just over the age of sexual consent (as if that means shit to anybody...).

    I understood what you said (good explanation by the way), but I just took a random guess before I [ironically] left for school.

    Hi, Mike:

    Ignore the title - I was being a goof.

    Now that I no longer attend school, I like school more than ever before. Talk about irony!
    LOL


    I'm a chronic study-holic because science, math and computers fascinate me to no end and I love to study and learn new things. I'm determined to learn, in spite of the teachers!

    Hope you are doing well in your studies.

    Oh to be free, so blissfully free, of the ravages of intelligence, there is no greater joy! - The Cweationist's Cweed

    All that is necessary for evil to triumph is a good PR firm.
    Very funny, Scotty. Now beam down my clothes!

  12. #12
    Join Date
    Jan 2005
    Posts
    623
    Its funny you mention quadratic equation...

    Isnt that Negative b, plus/minus the square root of b squared minus 4ac all over 2a? If it is, i cant believe i remember that useless piece of information. I say useless because I do not know why we ever used it or where it came from. It thats not the formula, what the hell did I just spit out? Its a function that was engraved in my head during high school. It bothers me that I remember things as such but cannot remember names of people and places.

    I didnt have time to work on the answer today. I was coding some image editing software for a piece of shopping cart software.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  13. #13
    Join Date
    Sep 2005
    Posts
    2,050
    Quote Originally Posted by JayT View Post
    Hope you are doing well in your studies.

    Studies?

    ...

    ...

    Yeah, I really should get some homework done instead of wasting time on the internet. It's so damn addicting though.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts