Rotavirus

Rotavirus has many variations. All the variations are generated from a wheel, which contains a cycle of N N nodes, with an extra node connected to each one on the cycle, as shown in the picture:

All the valid rotaviruses are formed by breaking some edges from the wheel, such that every two nodes have one and only one path to reach each other. When N = 3 N=3 , there are 16 16 different valid rotaviruses:

For a wheel containing a cycle of N = 100 N=100 nodes, there are n n different rotaviruses to generate from.

How many digits are in n n expressed in base 10 ? 10?


This problem was inspired by the popular weekly problem .

40 41 42 43

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.

3 solutions

Typical Beam
Sep 27, 2018

Treat the rotavirus as a labelled graph on N + 1 N+1 vertices. By the matrix tree theorem, the number of spanning trees of the graph is given by

3 1 0 0 0 1 1 3 1 0 0 0 0 1 3 1 0 0 1 0 0 0 1 3 \begin{vmatrix} 3 & -1 & 0 & 0 & \cdots & 0 & -1 \\ -1 & 3 & -1 & 0 & \cdots & 0 & 0 \\ 0 & -1 & 3 & -1 & \cdots & 0 & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ -1 & 0 & 0 & 0 & \cdots & -1 & 3 \\ \end{vmatrix}

If we call the above determinant A N A_N , then we get, after "some" algebraic manipulations, A N = L 2 N 2 A_N = L_{2N} - 2 where L k L_k is the k k th Lucas number. Thus

A 100 = ( 1 + 5 2 ) 200 + ( 1 5 2 ) 200 2 A_{100} = \left ( \frac{1+\sqrt{5}}{2} \right )^{200} + \left ( \frac{1-\sqrt{5}}{2} \right )^{200} - 2 which has 42 42 digits.

Honestly, this is Discrete Mathematics.

Veselin Dimov
Jan 8, 2021

My solution is much simpler with all respect to @typical beam and @K T . The answer of the universe is 42, so the answer of this problem is 42 as well. Brilliant!

Next time I'm going to change the answer to ln N \lfloor \ln N \rfloor :)

Alice Smith - 5 months ago
K T
Jan 4, 2021

After finding 1,5,16,45, I checked the OEIS A004146 . It said: 'This is the r=5 member in the r-family of sequences S_r(n) defined in A092184 Number of spanning trees of the wheel W_n on n+1 vertices. ....' And under A092184, under FORMULA: 'S_r type sequences are defined by a(0)=0, a(1)=1, a(2)=r and a(n-1)*a(n+1) = (a(n)-1)^2.'

This formula rewrites as a n = ( a n 1 1 ) 2 a n 2 a_n= \frac{(a_{n-1}-1)^2}{a_{n-2}} and led me to coding it (see below) with output

S_5(0)=0

S_5(1)=1

S_5(2)=5

S_5(3)=16

...

S_5(100)=627376215338105766356982006981782561278125

The last entry has 42 digits

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
def S_r_array(r, upto):
    s=[0,1,r]
    for n in range(3,upto):
        numer = (s[n-1]-1) * (s[n-1]-1)
        denom = s[n-2]
        if numer % denom ==0 :
            newterm=numer//denom
        else:
            newterm=numer/denom
        s.append(newterm)
    return s

s = S_r_array(5,101)
for n in range(101):
    print("S_{}({})={}".format(5,n,s[n]))

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...