The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
4answers
141 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
143 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
148 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
95 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 ...
2
votes
2answers
96 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
70 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
48 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
194 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
227 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
119 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 ...
1
vote
1answer
255 views

How to generate the following partitions [closed]

I have 2N items and I need to form 2N sets each with N items. The items should be evenly ...
1
vote
1answer
130 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
83 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
199 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: ...
3
votes
7answers
607 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
178 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
248 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 ...
2
votes
1answer
188 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
477 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 ...