Today Hakase will be taking Sakamoto-san for a walk (that's a cat). Unfortunately, they ended in town district that is notorious for dogs.
The district has 18 streets, 9 vertical, 9 horizontal ( image above ). If intersections marked with the triangle are "dog spots" (places where a person will definetely encounter a dog ), on how many ways Hakase and Sakamoto-san can arive safely to the finish point.
Hints: Assume that they will only go up and right .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Good usage of the Principle of Inclusion and Exclusion. Can this be simplified even further?
Solution:
Movement can be written using letters R and U . They will go exactly 9 times up and 9 times right. Therefore, there are 4 8 6 2 0 different ways from start to finish point. Now, we will subtract every way that passes through dog spot, but we have to be careful, to avoid including some ways twice.
Passing through first dog spot (3, 3), there are ( 6 3 ) ( 1 2 6 ) = 1 8 4 8 0 ways in total.
Passing through the second (or third) dog sport (3, 6) or (6, 3), there are ( 9 6 ) ( 9 6 ) , but 2 0 × ( 9 6 ) are already included when passing through the firs dog spot. When that is subtracted, there will be 5 3 7 6 new ways, that are not included until now.
Passing through the fourth (6, 6) dog spot. We will proceed similarly as for the third and the second one. Calculate all the ways that pass through 4th spot, then subtract those who pass through 4th and nth spot (n = 1, 2, 3). Leaving 7 9 2 0 .
When they are all subtracted from the all possible ways, 1 1 4 6 8 safe ways are left.
Nice problem. I like the Nichijou reference as well :). I hope you won't mind me adding this problem to the set Mathematics in Anime .
Log in to reply
It would be my honour, so to say. I will just say that I was very pleased when I had seen a problem with an anime picture ("Too much sugar in my coffee"). I haven't solved it though... but I liked it anyway :)
Problem Loading...
Note Loading...
Set Loading...
Without restriction, there are ( 1 8 9 ) = 4 8 6 2 0 ways of walking Sakamoto-san.
Denote as A the upper left dog spot, as B the upper right dog spot, as C the lower left dog spot, and as D the lower right dog spot.
We will use the Principle of Inclusion-Exclusion to enumerate the number of routes passing through the dog spot(s) before taking the complement of it.
Let N ( X ) denotes the number of ways to complete the route walking through dog spot X , while N ( X ∩ Y ) denotes the number of ways to complete the route walking through both dog spots X and Y , with X , Y ∈ { A , B , C , D } .
In other words, we are trying to evaluate N ( A ∪ B ∪ C ∪ D ) = N ( A ) + N ( B ) + N ( C ) + N ( D ) − N ( A ∩ B ) − N ( A ∩ C ) − N ( A ∩ D ) − N ( B ∩ C ) − N ( B ∩ D ) − N ( C ∩ D ) + N ( A ∩ B ∩ C ) + N ( A ∩ B ∩ D ) + N ( A ∩ C ∩ D ) + N ( B ∩ C ∩ D ) − N ( A ∩ B ∩ C ∩ D ) .
Verify the following:
N ( A ) = ( 9 3 ) ( 9 3 ) = 7 0 5 6
N ( B ) = ( 1 2 6 ) ( 6 3 ) = 1 8 4 8 0
N ( C ) = ( 1 2 6 ) ( 6 3 ) = 1 8 4 8 0
N ( D ) = ( 9 3 ) ( 9 3 ) = 7 0 5 6
N ( A ∩ B ) = ( 9 3 ) ( 6 3 ) = 1 6 8 0
N ( A ∩ C ) = ( 9 3 ) ( 6 3 ) = 1 6 8 0
N ( A ∩ D ) = 0
N ( B ∩ C ) = ( 6 3 ) ( 6 3 ) ( 6 3 ) = 8 0 0 0
N ( B ∩ D ) = ( 9 3 ) ( 6 3 ) = 1 6 8 0
N ( C ∩ D ) = ( 9 3 ) ( 6 3 ) = 1 6 8 0
N ( A ∩ B ∩ C ) = ( 6 3 ) ( 6 3 ) = 4 0 0
N ( A ∩ B ∩ D ) = 0
N ( A ∩ C ∩ D ) = 0
N ( B ∩ C ∩ D ) = ( 6 3 ) ( 6 3 ) = 4 0 0
N ( A ∩ B ∩ C ∩ D ) = 0
Therefore, we have
N ( A ∪ B ∪ C ∪ D ) = 1 8 4 8 0 ( 2 ) + 7 0 5 6 ( 2 ) − 1 6 8 0 ( 4 ) − 8 0 0 0 + 4 0 0 ( 2 ) = 3 7 1 5 2
Taking the complement yields the answer.
4 8 6 2 0 − 3 7 1 5 2 = 1 1 4 6 8