A virus gone viral

In a laboratory housed in kotebe micro-organisms were arranged in a n × n n\times n grid for studying purpose. By accident one of the laboratory technicians spills an infectious virus on some of the organism.This virus has the ability to infect the organism located immediately (east, west, north and south) of its already infected organism in 3 3 microseconds.

How many microseconds does it take for a virus spilled at the center(i=j) of an 11 × 11 11\times 11 grid to infect all the organisms.

Details and Assumptions

-Explicit example, 0 0 means infected and 1 1 means normal. If the virus was spilled on the center of a 3 × 3 3\times 3 grid.

( 1 1 1 1 0 1 1 1 1 ) 3 μ s ( 1 0 1 0 0 0 1 0 1 ) 3 μ s ( 0 0 0 0 0 0 0 0 0 ) \begin{pmatrix} 1 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 1 \end{pmatrix}\overset { 3\mu s }{ \longrightarrow } \begin{pmatrix} 1 & 0 & 1 \\ 0 & 0 & 0 \\ 1 & 0 & 1 \end{pmatrix}\overset { 3\mu s }{ \longrightarrow } \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}

For a total of 6 6 microseconds.

The time between getting infected and infecting others is negligible.


The answer is 30.

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.

1 solution

Thaddeus Abiy
Aug 19, 2015

Notice that the expanding area is a tilted square . After the n n th iteration , it will have a side length of size n n . The number of iterations until the matrix is filled is thus the size of the largest diagonal of the matrix. For a square matrix n × n n \times n where n n is odd, the largest diagonal is equal to n n . The total time T T it takes for the region to fully fill an odd square matrix with side length N N is:

T = 3 ( N 1 ) μ s T = 3 ( N - 1) \mu s

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...