Skip to main content

Questions tagged [combinatorics]

Combinatorics is a branch of mathematics concerning the study of finite or countable discrete structures.

Filter by
Sorted by
Tagged with
2 votes
0 answers
21 views

Mathematica implementation of Welch method for constructing Costas arrays

I ported C++ implementation of Welch method for constructing Costas arrays to Mathematica. Any feedback would be appreciated. ...
138 Aspen's user avatar
  • 453
4 votes
1 answer
168 views

The Permutations Algorithm using BubbleSort and stack in PicoBlaze assembly language - attempt #2

So, this is improved code from my previous attempt to implement the permutations algorithm in PicoBlaze assembly language. You can see it live here: ...
FlatAssembler's user avatar
4 votes
1 answer
273 views

The permutations algorithm in PicoBlaze assembly language

You can see it live here: ...
FlatAssembler's user avatar
2 votes
1 answer
178 views

Java program for calculating probabilities of die combinations in Yatzy

Yatzy Yatzy is a dice rolling game where players aim to get particular die combinations. This program counts probability of each such combinations. They are: All five ones, All five twos, Same for ...
coderodde's user avatar
  • 31k
3 votes
2 answers
129 views

Buy units of a good - If you buy them together, you get a discount - Find the cheapest way to purchase all goods available

The problem is as follows: A user needs to be able to purchase goods. He has a total of five distinct goods available: I've called them '1', '2', '3', '4', and '5', If the user buys them in sets, he ...
Andrew Bailey's user avatar
3 votes
1 answer
90 views

<Programming in Lua - 4th> exercise 2.2 - place 8 queens

About exercise 2.2 Place N queens on N*N board, 1 queen per line, so that all queens are safe. Use permutation to improve the provided implementation from book. The ...
Eric's user avatar
  • 151
1 vote
1 answer
109 views

Finding the number of distinct decompositions a number has using only repdigits

This is a problem from a previous semester that I am trying to upsolve. I am trying to solve a problem involving the total number of ways of decomposing a number using only repdigits. A repdigit is a ...
Lesserrafim's user avatar
3 votes
2 answers
211 views

Find the join of two set partitions

Two partitions of a set have a greatest lower bound (meet) and a least upper bound (join). See here: Meets and joins in the lattice of partitions (Math SE) The meet is easy to calculate. I am trying ...
Watchduck's user avatar
  • 230
3 votes
1 answer
90 views

Number of partitions of (a,b) into k distinct parts which sum up to (a,b)

Problem set This is somewhat a generalization of the famous partition of integer n into k parts. Given two integers ...
linuxbeginner's user avatar
4 votes
1 answer
134 views

Repetition-Limited Multiset Coefficient function

This is a simple multiset coefficient calculator in python, that will calculate both standard multiset coefficients, as well as multiset coefficients with repetition limits, used initially as part of ...
Lee Davis-Thalbourne's user avatar
2 votes
1 answer
152 views

Combinations of elements in array

I wrote this code to get all possible arrangements for an array containing 3 elements: ...
John's user avatar
  • 49
1 vote
0 answers
69 views

Video Poker with luck modifier

While grinding for coins on the GTA San Andreas casino poker machines I started to wonder how exactly one might implement a luck modifier to a video poker game without it being completely obvious to ...
TorbenPutkonen's user avatar
0 votes
0 answers
114 views

Generating group permutations: an extended Heap's algorithm in Java

Suppose we have a sequence of sequences <1, 2> <3, 4>. There, we have two groups: <1, 2> and ...
coderodde's user avatar
  • 31k
6 votes
2 answers
112 views

Schedule a series of 1:1 contests so that each entrant plays against every other

My sister is organizing a Majong tournament. She wants to set up a set of round-robin rounds. There will be 16 players at 4 tables; 4 players per table. Players will play 5 rounds. She wants every ...
JDT's user avatar
  • 81
2 votes
1 answer
159 views

Find the list of combination (with repetition) given rank and number of items. (Lexicographic ordering)

The problem involves the fastest possible method to generate a list of combinations which repeats from all the possible combinations with repetition allowed. I know there needs to be a way to ...
Reptorian's user avatar

15 30 50 per page
1
2 3 4 5
34