1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How do they do this?

Discussion in 'Software Development' started by starchild, Sep 11, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. starchild

    starchild Thread Starter

    Joined:
    Sep 17, 2002
    Messages:
    2,111
    http://digicc.com/fido/

    It's either something very complicated or something very simple, right in front of me.

    I'm guessing a javascript of some kind, that takes the numbers you put in (minus the one you circles) and figures out all the combinations of numbers that would be subtracted to get it, with all the numbers that could be in it and now aren't.

    I tried doing it without the the subtracting. Like just thinking of number "1" and putting in 2-3-4 and it came out with 9 and not 1. (and it doesn't always come out with 9 for the answer. I know there's something that always comes up to 9 no matter how you do it).

    I also tried thinking of a different number than I circled in case it WAS reading my mind :) it still gave the one I circled.

    It must have something to do with the numbers you put in, that's the only interaction with the program.

    And even though there are countless combinations of numbers that could be used (subtracted) there's still only 1-9 that can be missing from the answer.

    But still.... it's always right (if you do it as it says).

    Any ideas?

    ~ Carrie
     
  2. Chicon

    Chicon

    Joined:
    Jul 29, 2004
    Messages:
    6,650
    Hi starchild,

    After the substraction, the result is always a multiple of 9.
    For example, you circle a 8 and you enter 2 - 4 - 4 : the program does 2 + 4 + 4 = 10; if the result > 9 => 10 - 9 = 1; the number read in your mind is 9 - 1 = 8.
     
  3. starchild

    starchild Thread Starter

    Joined:
    Sep 17, 2002
    Messages:
    2,111
    You lost me after the 10, I don't see how it gets 9=> 10-9=1 (etc)and comes up with 8. Do you mean it adds up the numbers in the answer and decides what number is missing to make "9"?

    And why is the answer always a multiple of 9?

    I do know there's something about numbers and multipules of 9, though. Like up to a point whatever you multiply by 9 comes up to 9 (when the answer is added together).

    ~ Carrie
     
  4. Chicon

    Chicon

    Joined:
    Jul 29, 2004
    Messages:
    6,650
    It's a simple arithmetic rule : the sum of the digits which compose a number multiple of 9 is itself multiple of 9.
    In my example, 2 - 4 - 4 - 8 ==> 2 + 4 + 4 + 8 = 18 (multiple of 9) and 2448, 8424, 2484, and so on are numbers multiple of 9.
    When you enter 2 - 4 - 4 and circle 8; the program does the following operations :
    1°) 2 + 4 + 4 = 10
    2°) if the result is greater or equal than 9 => the program must subtract 9 from the result : 10 - 9 = 1 and this operation is repeated until the result < 9
    3°) according to the rule, the number to be guessed is the complement by 9 => 9 -1 = 8
     
  5. Chicon

    Chicon

    Joined:
    Jul 29, 2004
    Messages:
    6,650
    "Why the subtraction is always a multiple of 9"

    There is another arithmetic rule a bit more tricky :
    You have 2 numbers (integers only) : A and B
    you divide them by 9 and their remainder are called r(A) and r(B)
    The rule is : if r(A) = r(B), the result of (A - B) or (B - A) is a multiple of 9

    If you choose A = 5672 and B = 2765 ==> r(A) = 2 and r(B) = 2 ==> 5672 - 2765 = 2907 is a multiple of 9 !
     
  6. starchild

    starchild Thread Starter

    Joined:
    Sep 17, 2002
    Messages:
    2,111
    Chicon, you are one smart dude :)

    I feel smarter just reading this.

    I think the end result is the Flash program isn't really reading my mind

    Not that I really thought so....

    ~ Carrie
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/272809

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice