The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
0answers
41 views

Partition In Cellular Automation

Since i am pretty much new to Mathematica, i am having trouble with the use of Partition in Cellular Automaton. The code,taken ...
1
vote
1answer
71 views

Integer partitions and dice result probabilities

This is a Project Euler question, so no spoilers :] I was going to try to solve it by first finding how many ways a certain sum can be acquired from a number of dice using ...
6
votes
2answers
139 views

Checking if one partition is a subpartition of another

Say I've got two partitions of an list (not necessarily containing numbers, and not necessarily distinct), and I want to check that one is a subpartition of the other. Let's look at some examples: ...
2
votes
4answers
136 views

Express integer as a sum of specific integers from a set, using each no more than once

I know there's a way to find partitions of an integer as a sum like: IntegerPartitions[12,All,{1,4,7}] which returns ...
1
vote
1answer
67 views

Is there a way to split a list (or number) into a specific number of parts?

I know there's a way to split a list into parts of a specific length, and I know there's a way to get all possible partitions of an integer. But I was wondering if there's a way to partition a list ...
2
votes
2answers
165 views

Partition a range of integers into triples

Some time ago, I was asked to look at a simple to formulate puzzle. Consider the list of numbers {1,2, ..., 33}. Try to split this list in 11 triples, such that in ...
15
votes
3answers
185 views

Partitioning with constraints on subsets

Given the following data: constraints = {{11, 2}, {11, 3}, {11, 4}, {11, 6}, {11, 9}, {1, 6}, {5, 6}, {2, 5}}; weights = {3, 7, 3, 2, 4, 2, 2, 2, 3, 2, 1}; I ...
4
votes
4answers
204 views

Partition list into a given number of sub-lists

I'm having quite a hard time with the following. I would like to partition a list into a list of sub-lists, in such a way that the number n of sub-lists is fixed. ...
2
votes
2answers
153 views

Speeding up the generation of all k-edge-coloring of a graph

A $k$-edge-coloring of a graph $G=(V,E)$ is a function from $E$ to $\{1,\ldots,k\}$, so in other words every edge of $G$ receives one of the $k$ colors available. (In particular, note that we are not ...
4
votes
2answers
166 views

Looping through a list partition

I got the following list and I would like to loop and partition this list in the following way. ...
3
votes
2answers
114 views

Partition a list dependent on consecutive list values

I have a list of 2D points which I partition every time the distance between consecutive list elements is bigger than a certain threshold. In a second step I select all the lists that start within a ...
3
votes
2answers
118 views

How to randomly partition a range [closed]

I need to create a partition of a list of integers from $1$ to $n$ into a number of partitions of different size, with the constraint that the total number of elements in the partition must equal $n$. ...
1
vote
2answers
90 views

Make a partition with a rule

I wrote this line of code : {{1, 1, 1}, {1, 1}} /. ((x___ /; Length[x] > 2) -> Partition[x, 2, 1]) generates this error : Partition::pdep: Depth 1 ...
2
votes
1answer
62 views

Mathematica 8: EdgeList and CommunityStructureAssignment shadowing problem

I'm facing some issues when trying to use the CommunityStructureAssignment function from the GraphUtilities package in Mathematica 8. I'd like to output a ...
4
votes
4answers
241 views

Splitting a string into substrings of length 1 and 2

There is already a thread on how to split a string into equal sized chunks. I'm wanting to split a string into sets of substrings of length 1 and 2. For example, if I have the string "123456", my list ...
4
votes
1answer
237 views

Partitioning an image based on features

I have an image that has various characters hand drawn in it, like numbers and letters. I'm trying to partition each character into it's own image so I can run it through ...
2
votes
1answer
148 views

Using IntegerPartitions for distinct integers

What I would like to do is to find a way to test how many ways m distinct integers from the set {1,..., n} where ...
2
votes
3answers
220 views
1
vote
1answer
145 views

Partitioning a numerical integral: need to integrate spectra

I am trying to integrate a spectrum I obtained from a fourier transform infrared spectroscopy experiment, in order to determine the global warming potential of green house gases. In order to do this, ...
0
votes
2answers
87 views

Display Part Of or Summarize Other Notebooks

How might I display parts of(or basically summarizing) one Notebook from parts of several other Notebooks? This isn't a strict question question but more of a general/wiki question of how to organize ...
4
votes
3answers
212 views

Variable partitioning of the data in the form of “list of lists”

I am looking for a way for variable partitioning of the data in the form of a "list of lists" for interpolating the imported data from excel. The data looks like: ...
4
votes
7answers
723 views

Finding the midpoints of an ordered list of numbers

Suppose that I have an ordered list of numbers. The numbers in the list may be evenly spaced, but they may not be. Here are two examples, list1 and ...
3
votes
1answer
187 views

Finding the largest integer that cannot be partitioned in a certain way

I want to use Mathematica to solve the problem: Find the maximum $k$ such that $6x+9y+20z=k$ does not have a non-negative solution. I tried FrobeniusSolve. ...
4
votes
2answers
273 views

Partition a set into $k$ non-empty subsets

The Stirling number of the second kind is the number of ways to partition a set of $n$ objects into $k$ non-empty subsets. In Mathematica, this is implemented as ...
3
votes
1answer
213 views

Integer partitions in all orderings

I want to partition an integer into $k$ integers all possible orderings. This can be done in the following way ...
2
votes
3answers
531 views

Generating pairs of additive and multiplicative factors for integers

Given an integer $n$, I want to get two lists: a) the set of pairs of the divsors $a,b$ into exactly two factors $n=a\cdot b$, b) the set of pairs $a,b$ of two summands $n=a+b$. The code I ...