munin
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 27

Thread: Night Of The Living Brain Dead

  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

    I'm Not Really An Idiot, But I Play One In Washington

    Hi, SyntaX

    Logs are everywhere. You use them indirectly in some of your programs and may not even realise it, e.g., your base converter program.

    My biggest advantage is that I've used practical math extensively in my work for millions of years, and taught aspects of it, so I'm not as out of practice as many others my age from lack of usage.

    Math is one of those things that if you don't make use of it, it fades over time, like muscles you never exercise.

    If you look at practical math as drudgery, then your teacher didn't know how to teach it properly.

    I feel sorry for their victims ... errr ...I mean students.

    In high school, back in the days when the earth was young, I was told by a math teacher in regards to a common equation called a quadratic, the equation that rules the universe, that all I had to do was memorise the solution long enough to recognise it and pass an upcoming exam, then I could forget it because I would never see it again!

    Never see it again? The single MOST equation ever discovered in the history of the world?

    Where did he obtain his teaching diploma - from the *-Stooges Academy of Science ?

    Grrrrrrrr

    I've had a BAD attitude towards most professional educators ever since because most of them that I have met are almost clones of that guy. It's disgusting!

    All fancy frills, robes, caps and hollow pompous circumstances!
    LOL

    If a person told me he had PhD in piano playing from Harvard University, I'd tell him to stuff that diploma back up that dark place it most like came from. I would tell him to sit down and play the piano for me and I'll judge from his proven ability. By that standard, **&#*7; of them would be out of a job tomorrow and rightly so - regardless of their credentials on paper!

    A monkey, Harvard credentials notwithstanding, still remains a monkey!

    I've lost respect for diplomas per se. Anyone can fake credentials, but it's not so easy to fake genuine ability.

    Diplomas today have the least indicative value than they've ever had in the history of education.

    Do people presidents because of their brilliant intellects?

    "All the waste in a year from a nuclear power plant can be stored under a desk."

    Ronald Reagan (Republican candidate for president), quoted in the Burlington (Vermont) Free Press, February *5, **80.

    (In reality, the average nuclear reactor generates *0 tons of radioactive waste per year.)
    "The point now is how do we work together to achieve important goals. And one such goal is a democracy in Germany."

    George W. Bush, D.C., May 5, 2006
    Obviously, America's most brilliant, major university educated minds at work. And it gets worse. Much, much worse! (Vis former vice president Dan Quayle, Ronald Reagan's and George W. Bush's public quotes) if you want a laugh.

    He may look like an idiot and talk like an idiot, but don't let that fool you. He really is an idiot.

    Groucho Marx
    Woe to the republic!
    LOL

    If presidents required a qualifications exam, like janitors who work for the government do, few countries would have a president! Maybe that would be a good thing after all!

    Unfortunately, most people underestimate themselves and are *00% more intelligent than they realise! That's the very first thing students should be taught to build up their confidence - the one thing they usually lack the most.

    Sorry to rave.
    :Þ


    The people here are generally above average, which is one reason I like this forum.

    That's my rant for the day, but I take education with deadly seriousness.

    I have to get back to work reprogramming my site in PHP 5 - ohhh, the agony!

    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
    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!

  13. #13
    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]

  14. #14
    Join Date
    Jun 2006
    Posts
    459
    The copy and paste feature is the best way to fake being smart.
    7h* L**7*57 c4n7 h4ck m*!
    Proud to have quit playing ®µÑȧ©ÅÞË

    If you write like a semi-literate boob you will very likely be ignored.
    Writing like a l**t script kiddie hax0r is the absolute l**t*st way to write!
    L0L

  15. #15
    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