Top "Discrete-mathematics" questions

NOTE: Only questions about software development related to discrete mathematics are on topic.

Is it possible to implement bitwise operators using integer arithmetic?

I am facing a rather peculiar problem. I am working on a compiler for an architecture that doesn't support bitwise …

bitwise-operators discrete-mathematics compiler-optimization
Difference between Discrete Structures and Discrete Mathematics

I haven't yet found a good answer. Or any answer, for that matter. I've been asked to teach a discrete …

math computer-science discrete-mathematics
Finding a Eulerian Tour

I am trying to solve a problem on Udacity described as follows: # Find Eulerian Tour # # Write a function that takes …

python algorithm graph discrete-mathematics
How do I write a recursive function for a combination

I am going over recursive functions and i understand how to write basic ones, but I have a question on …

java recursion discrete-mathematics
Number of n-element permutations with exactly k inversions

I am trying to efficiently solve SPOJ Problem 64: Permutations. Let A = [a1,a2,...,an] be a permutation of integers 1,2,...,n. …

algorithm permutation dynamic-programming combinatorics discrete-mathematics
Translating “neither…nor” into a mathematical logical expression

Having some difficulty doing translations for complicated neither...nor sentences. With these characters: ~ Negation V Disjunction & Conjunction I'm trying …

math logic discrete-mathematics calculus
F(n) = F(n-1) - F(n-2)

I came across this sequence in a programming contest F(n)= F(n-1)-F(n-2); Given F0 and F1 find …

math sequence discrete-mathematics cyclic
How many different partitions with exactly n parts can be made of a set with k-elements?

How many different partitions with exactly two parts can be made of the set {1,2,3,4}? There are 4 elements in this list …

math discrete-mathematics data-partitioning
How many different possible ways can persons be seated in a round table?

I am developing an algorithm and am looking at a possibility of the maximum number of iterations before arriving at …

algorithm math combinations permutation discrete-mathematics
Please explain to me the solution for the problem below

Problem: Consider the problem of adding two n-bit binary integers, stored in two n-element arrays A and B. The sum …

algorithm math discrete-mathematics