divisibility by seven by “A walk in the graph”, Can you solve?
It is pretty interesting. Not only can it tell us whether the number is divisible by 7 but also the exact remainder obtained if the number is divided by 7.
How this works is that each node is connected to a remainder by 7. That is each node has a unique number in [0..6] associated with it. And the rest is simple modular arithmetic.
To enumerate the associated numbers, the bottom-most node has 0 associated with it. From there, keep following the black arrows- you’ll obtain the node associated with the next number. As in the right-most node is associated with 1, the topmost with 2 and so on. You’ll notice that the leftmost node is associated with 6 which in turn leads to 0.
You should also notice that the white arrows lead up from nodes n mod 7 to nodes n∗10 mod 7. This is important.
Now let us consider a number N with digits N1,N2...Nm with Nm being the unit digit.
We begin applying the given algorithm:
- We follow the black arrow N1 number of times and arrive at the node N1 mod 7.
- Next we follow the white arrow to arrive at the node N1∗10 mod 7.
- We repeat step 1 to follow the black arrow N2 number of times. Now we are at N1∗10+N2 mod 7.
- We follow step 2 again to arrive at N1∗100+N2∗10 mod 7.
- Applying the same procedure until the last digit, we finally arrive at the node N1∗10m−1+N2∗10m−2+..+Nm mod 7 which equals N mod 7. If we are at the bottommost node, then we conclude that N mod 7=0 and hence proving the divisibility of N by 7.
If anything is unclear, feel free to leave comments.
Found this cool test for divisibility by 7 on Tanya’s website. Read about how to use it here, but basically you follow that diagram a certain way.
and yes the graph is planar.
1. Write down a number n.
2. Start at the small white node at the bottom of the graph.
3. For each digit d in n, follow d black arrows in a succession, and as you move from one digit to the next, follow 1 white arrow.
For example, if n = 325, follow 3 black arrows, then 1 white arrow, then 2 black arrows, then 1 white arrow, and finally 5 black arrows.
If you end up back at the white node, n is divisible by 7.
Your Answer
More puzzles to try-
Best Place to Shop
What\’s the best place to go shopping in the ocean?Read More »What Is The Price Of The Perfume?
Jim purchased a bottle of an imported perfume at $250. The bottle looks very beautiful with silver linings on it ...Read More »You have a flashlight and 8 batteries
You have a flashlight that takes 2 working batteries. You have 8 batteries but only 4 of them work. What ...Read More »How will you survive this situation?
You are trapped in a remote place with barren land all around you.. You are standing in the middle of ...Read More »Can you calculate how long would it have taken to be filled half?
A large container is kept in open under the rain. Every passing hour, the water collected inside the container becomes ...Read More »Secret Message for you Puzzle
Detective Akash is on a secret mission and he wants to send a message to you. Detective Akash got a ...Read More »NDA Exam-II 2012 – Which number Fits at the question mark?
Which number Fits at the question mark?Read More »Correct Counting
I went to city Mexico on the way I saw four women, with four bags, who have four kittens. Each ...Read More »How can that be?
A sheep was in the field and it just vanished How can that be?Read More »The Monkey and the Coconut
Ten people land on a deserted island. There they find lots of coconuts and a monkey. During their first day ...Read More »Can you find out the missing number in the grid?
Can you find out the missing number in the grid?Read More »Black when clean riddle
I am black when clean and white when dirty. What am I?Read More »Bank Loan
A Miser man decided to go on a vacation for a month. He goes to the bank and asks for ...Read More »People in Bus
You are on a bus. 10 people get on at the first stop. At the next stop 25 people get ...Read More »Life Line
It is as light as a feather, yet the strongest of men cannot hold it for more than a minute. ...Read More »A person was born in 1940 having his 18th birthday
A person was born in 1940. Today is his 18th birthday. How is that possible?Read More »How can this be possible?
A writer was fifty years old in the year 2000 but he was forty years old in the year 2010. ...Read More »Replace Shaped Puzzle
Can you replace the X (both small and big x) with the numbers between 1 to 19 such that all ...Read More »Key, Door, Lock, Room, Switch on
Key, Door, Lock, Room, Switch on Arrange the words given above in a meaningful sequence. A) 4, 2, 1, 5, ...Read More »Sky and Ocean
I am four letters long. I can be seen in the sky, I am the ocean & I am the ...Read More »