The Oktave Forum
»
Technical
»
Science and Mathematics
»
Discrete Mathematics
(Moderator:
sanket
)
A "covering partition" puzzle and some questions
Username:
1 Hour
1 Day
1 Week
1 Month
Forever
Password:
Home
Help
Login
Register
News
:
Welcome to The Oktave Forum
.
« previous
next »
Pages:
1
[
2
]
Topic Tools
Topic Tools
Print
September 11, 2008, 05:07:09 am
#15
sanket
sanket
Show sanket's last posts.
Show general stats for sanket.
Global Moderator
Full Member
Karma: 4
Posts: 104
Re: A "covering partition" puzzle and some questions
Quote
Am afraid I don't get this either. What are '+' and '-' in terms of network operations?
Let's say we have a network of 13 nodes, with each node having the list P = {1, 3, 9}. Let's say every node connects to a set of other nodes in the following manner: a node with label n
i
will connect to the node with label n
i
+ P
i
; since edges are undirected, n
i
is also connected to n
i
+ p
i
*; thus, each node will connect to a maximum of 2*|P| other nodes. The operations are modulo n, of course.
Now, every node knows its direct connections. It also knows that all other nodes have an edge each to their corresponding +/- P
i
th nodes. In our specific example, node 1 is connected to 2, 13, 4, 11, 10 and 5. If we want to reach node 7 from node 1, node 1 will compute it as folows: 5 + (3 - 1) or, better still, 10 - (3). Because it knows that its neighbours have connections to nodes that are 1, 3 or 9 numbers away from them.
Update:
* I meant, n
i
is also connected to n
i
- p
i
«
Last Edit: September 11, 2008, 05:17:36 am by sanket
»
September 11, 2008, 12:07:18 pm
#16
sri
sri
Show sri's last posts.
Show general stats for sri.
Administrator
Sr. Member
Karma: 7
Posts: 264
Re: A "covering partition" puzzle and some questions
Quote from: sanket on September 11, 2008, 04:11:19 am
Quote
t's turning out to be the series 3n
Pmin = {1,3,9,27,81...} and max number that can be generated would be simply sum of all the elements of Pmin.
That's right! For a given n, the k elements of Pmin are, P1 = 3
0
, P2 = 3
1
, ..., Pk = n - summation(P1 through Pk-1) (Or Pk = 3
k-1
, if n is the biggest number for a given k).
If that is the case, then how is Pmin for 10 = {1,3,6}? 6 is not a power of 3.
September 11, 2008, 12:14:05 pm
#17
sri
sri
Show sri's last posts.
Show general stats for sri.
Administrator
Sr. Member
Karma: 7
Posts: 264
Re: A "covering partition" puzzle and some questions
Quote from: sanket on September 11, 2008, 05:07:09 am
Let's say we have a network of 13 nodes, with each node having the list P = {1, 3, 9}. Let's say every node connects to a set of other nodes in the following manner: a node with label n
i
will connect to the node with label n
i
+ P
i
; since edges are undirected, n
i
is also connected to n
i
+ p
i
*; thus, each node will connect to a maximum of 2*|P| other nodes. The operations are modulo n, of course.
Sorry, I'm still not getting the idea..
What is P
i
in the earlier expression? Is it the i
th
element of P? (If P is considered as an ordered tuple, of course).
If so, how is P
i
related to n
i
? I believe the interval range for i in n
i
is 0-12 or 1-13. But the range for i in P
i
is only 1-3.
I'm quite stuck here and could not proceed further.
September 11, 2008, 01:30:34 pm
#18
sanket
sanket
Show sanket's last posts.
Show general stats for sanket.
Global Moderator
Full Member
Karma: 4
Posts: 104
Re: A "covering partition" puzzle and some questions
Quote from: sri on September 11, 2008, 12:07:18 pm
Quote from: sanket on September 11, 2008, 04:11:19 am
Quote
t's turning out to be the series 3n
Pmin = {1,3,9,27,81...} and max number that can be generated would be simply sum of all the elements of Pmin.
That's right! For a given n, the k elements of Pmin are, P1 = 3
0
, P2 = 3
1
, ..., Pk = n - summation(P1 through Pk-1) (Or Pk = 3
k-1
, if n is the biggest number for a given k).
If that is the case, then how is Pmin for 10 = {1,3,6}? 6 is not a power of 3.
As I said, for a given k, there is a maximum n up to which you can construct all numbers using the k elements in Pmin. And the Pmin for this maximum n is, Pmin = {3
0
, 3
1
, 3
2
, ..., 3
(k-1)
}.
*However*, in the general case, the Pmin starts as 3
0
, 3
1
etc.. But the last element of Pmin might not be a power of 3. It will be this - Pk = n - summation(all previous elements of Pmin). So, it is basically "whatever is left" after you have divided the number into sums of powers of 3.
So, for 10, Pmin = {1, 3, 10 - (1 + 3)} = {1, 3, 6} or for 51, Pmin = {1, 3, 9, 27, 11}
«
Last Edit: September 11, 2008, 04:18:01 pm by sanket
»
September 11, 2008, 02:23:58 pm
#19
sanket
sanket
Show sanket's last posts.
Show general stats for sanket.
Global Moderator
Full Member
Karma: 4
Posts: 104
Re: A "covering partition" puzzle and some questions
The following is an explanation for the 3^k series. This is not an exact reasoning, but an attempt to show how it works.
Let us say we want to cover numbers from 1 through n. Let us not specify n. Let us simply say we want to generate the largest n possible using k numbers that are elements of Pmin.
Let's begin at the beginning.
When k = 1, We can only have Pmin = {p
1
= 1}, and the numbers covered, C = {1}
When k = 2, let's say p
2
is the next element. What should it be? We know that using p
1
and p
2
, we can construct 2 more numbers. In addition, p
2
itself will be another number it will cover. Now, since we want to maximize the numbers that are covered, we don't want a combination of p
1
and p
2
to cover a number that is already covered by p
1
. So, on the number line, p
2
should be as far away from p
1
as to cover all numbers after p
1
to its left, and itself, plus another p
1
numbers to its right.
More simply, p
2
- (the biggest number p
1
has covered) = (the biggest number p
1
has covered) + 1
Specifically, p
2
- 1 = 2. Thus, p
2
= 3.
When k = 3, we need to find p
3
. Now, the set {1, 3} can cover up to 4. So, we can cover from p
3
- 4 through p
3
+ 4. Again, to maximize this, we need to place p
3
optimally on the number line. So, p
3
should be placed 5 slots away from p
2
. So, p
3
is 9. Another way to look at it is this: p
3
covers 4 numbers to its left + it covers itself + it covers 4 numbers to its right. Thus, 9.
When k = 4, p
4
= 13 + 1 + 13 = 27 [13 = 1 + 3 + 9]
Similarly, p
5
= 40 + 1 + 40 = 81 [40 = 27 + 13]
p
6
= 121 + 1 + 121 = 243 [121 = 81 + 40]
p
7
= 364 + 1 + 364 = 729 [364 = 243 + 121]
p
8
= 2187 etc..
«
Last Edit: September 11, 2008, 04:19:58 pm by sanket
»
September 11, 2008, 02:58:43 pm
#20
sanket
sanket
Show sanket's last posts.
Show general stats for sanket.
Global Moderator
Full Member
Karma: 4
Posts: 104
Re: A "covering partition" puzzle and some questions
Quote
Sorry, I'm still not getting the idea..
Okay, guess I am not explaining properly. Plus I mixed up notations. So ignore the previous one. Let me try here.
Let us say there are n nodes, N = {1, 2, ..., n}. An element N
i
is any node in this list.
We have a P
min
= {p
1
, p
2
, ..., p
k
}. We have k elements and P
j
is any element in this set.
Now, P
min
is a skip-list similar to the Chord skip-list. In case of Chord, every node connects to nodes that are {2, 4, 8, ..., 2
log n
}, skips away from itself. In our case, every node connects to nodes that are {p
1
, p
2
, ..., p
k
}, skips away from itself. Since, the edges are undirected, a node N
i
is effectively connected to nodes N
i
+/- P
j
(1 <= j <= k).
In the specific example, where n = 13, and P
min
= {1, 3, 9}, node 1, for example, is connected to 1 + 1 = 2, 1 - 1 = 13 (this is modulo 13), 1 + 3 = 4, 1 - 4 = 11, 1 + 9 = 10, 1 - 9 = 5. The other nodes are also similarly connected.
Every node knows its direct connections. It also knows that all other nodes use P
min
to make connections. So, it can work out a routing scheme that is akin to constructing a number using P
min
. For example, I want to reach node 7 from node 1. So, 7 = (1 + 9) - (3) = 10 - 3. Node 1 is connected to 10. And it knows that 10 is connected to 7 as it is 3 numbers away from it. Similarly, 6 = (5) - (1), 8 = 5 + 3 or 11 - 3 and so on.
«
Last Edit: September 11, 2008, 04:00:49 pm by sanket
»
September 11, 2008, 03:18:29 pm
#21
sri
sri
Show sri's last posts.
Show general stats for sri.
Administrator
Sr. Member
Karma: 7
Posts: 264
Re: A "covering partition" puzzle and some questions
Ah! I think I get the idea now.. Somewhat similar to the undirected version of deBruijn graphs. Will analyze in more detail later when time permits.
Pages:
1
[
2
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Technical
-----------------------------
=> Science and Mathematics
===> Discrete Mathematics
===> Optimization Theory
===> Probability and Statistics
=> Engineering
===> Data Management
===> Distributed Systems
===> Software Engineering
===> Programming
===> Web Design
=> Reviews
-----------------------------
General
-----------------------------
=> General Discussion
=> Events
===> OSL Events
===> Oktave Events
===> Startups
=> Books
Loading...