All mathematical questions about computer science, including theoretical computer science, formal methods, verification, and artificial intelligence. For questions about Turing computability, please use the (computability) tag instead. For numerical analysis, use the (numerical-methods) tag. For ...

learn more… | top users | synonyms

0
votes
1answer
90 views

Finding final value of sum from double summation code fragment.

sum = 0; inc = 0 for i from 1 to n for j from 1 to i sum = sum + inc inc = inc + 1 What does it mean when it is asking the "final value of sum" from above code ...
0
votes
1answer
176 views

Proof completion: if $Y$ is a closed term in strong nf, then $Yx$ weakly reduces to a strong nf $Z$

I am self-studying Hindley & Seldin's Lambda-Calculus and Combinators. I would appreciate some help with filling in a final detail for a proof for the following statement regarding combinatory ...
-1
votes
1answer
79 views

Computable Set & Function

we know that i read this sentence are true? can anyone say an example for following sentence? there are a non computable set A such that
0
votes
1answer
33 views

Convex hulls for a finite amount of points

I'm trying to understand what a convex hull intuitively is, and say given for a set of points $(x,y)\in\mathbb{R}^2$ how is it generated from these points? I tried reading the wikipedia article and ...
-1
votes
1answer
104 views

Turing & Computability & Computation

We know if we have: we can show (T=t= Turin Redu.) but i have no idea why this relation be correct? any idea?
-3
votes
1answer
306 views

How to obtain $\operatorname{lcm}(a_1,a_2,a_3,\ldots,a_n)\%1000000007$ [closed]

The problem is that you have $n$ numbers whose value can be in range $[1,100000]$. The task is to find the LCM of all these numbers. Now the answer can be very large so it should be printed MODULO ...
1
vote
1answer
207 views

Meaning of the characteristic polynomial of a matroid

From wikipedia The characteristic polynomial of a matroid $M$ (which is sometimes called the chromatic polynomial,[29] although it does not count colorings), is defined to be $$ p_M(\lambda) ...
0
votes
1answer
22 views

Linear equation so that the solutions has to be integers.

I have this equation $$-X_5-32X_4-32^2X_3-32^3X_2-32^4X_1=[PARAMETER]$$ I want to get all the solutions to this equation with a given parameter(integer) and all of the solutions has to be integers ...
0
votes
1answer
67 views

How do you find the probability of a certain state in Markov Chain?

This question appears without answer in an old exam I found (not a homework question) Suppose messages that enter a system need to be processed by two servers. They arrive at the system at a ...
2
votes
2answers
159 views

Equivalent definitions for a coloop?

From wikipedia, in a matroid, An element that belongs to no circuit is called a coloop. Equivalently, an element is a coloop if it belongs to every basis. I wonder why the equivalence? From ...
2
votes
1answer
55 views

How do the dependent sets of a matroid characterize the matroid?

Wikipedia says: The dependent sets of a matroid characterize the matroid completely. The collection of dependent sets has simple properties that may be taken as axioms for a matroid. So I ...
0
votes
0answers
110 views

to maximize the summation

let F=$∑i=1$ to $N$ $((abs(A[i]-X))^P mod $K$)mod K$ $A[1..N]$ is an array with $N$ elements, the problem is to find $X$ such that the above summation F maximized where $X$ can take any value from ...
5
votes
1answer
209 views

Mathematical definition of Blender's F-Curves

I'm designing software for generating animation curves. I'd like the curves to be based on those found in Blender 3D, which they call "F-Curves." According to the page on the Blender Wiki, they are ...
0
votes
2answers
48 views

How to prove that for all 25 ppl and 4 groups, there is a group of at least 6 ppl from the same group?

As of Jun.17, I predict that Brazil, Germany, Italy, and Argentina will make it to the semi-finals of the FIFA World Cup. Suppose you have a group of 25 footballers from those four countries. Prove ...
6
votes
2answers
702 views

Image Reconstruction:Phase vs. Magnitude

Figure 1.(c) shows the Test image reconstructed from MAGNITUDE spectrum only. We can say that the intensity values of LOW frequency pixels are comparatively more than HIGH frequency pixels. $$ ...
1
vote
1answer
36 views

What kind of set system is defined to have this property?

Let $E$ be a set, and $F \in \mathcal P(E)$ has the following property: For every $x\in E$ and $Y,Z\in F$ with $x\notin Y\cup Z$, there exists $X\in F$ with $(Y\cap Z)\cup\{x\}\subseteq X$. I wonder ...
2
votes
0answers
34 views

Generating interesting random TMs

To get a more intuitive understanding of the halting problem I want to generate some random TMs and see how they behave, what some heuristics can tell about them, etc. The problem is that, if I ...
1
vote
1answer
70 views

another counting problem

There are $k$ warriors that participate in the Wars, which have happened for the past $n$ years. Each year there has been a victor. Further, a particular warrior $W$ has won the Wars an even number of ...
1
vote
0answers
32 views

A set system generated by a closure operator?

Given a ground set $E$, and a matroid closure operator $\tau$ on $\mathcal P(E)$, we can define a set system $(E,F)$ with $$ F := \{X \in \mathcal P(E): \forall x \in X, x \notin \tau(X-\{x\}) \}$$ ...
1
vote
0answers
53 views

What does “modular” in “modular functions” mean?

From Wikipedia If $\Omega$ is a set, a submodular function is a set function $f:2^{\Omega}\rightarrow \mathbb{R}$, where $2^\Omega$ denotes the power set of $\Omega$, which satisfies one of the ...
0
votes
2answers
60 views

minmizing average problem

Given a set containing N numbers, minimize the average where you can take out any string of consecutive numbers in the set. |N|<=100000 Ex. {5, 1, 7, 8, 2} You can take out {1,7}, etc. but the ...
-1
votes
1answer
71 views

Function Combination on Computer Science

I read some material on Computational Function, every one could describe the result of following combination? suppose $g_1(x)=3x$, $g_2(x)=4x$, $f(x,y)=x+y$, how we compute combination of $f$ with ...
1
vote
2answers
275 views

Compressing binary numbers

If I have a arbitrarily long random binary number with the condition that the probability that a given digit is 0 and 1 is 1/4 and 3/4, respectively. What is the best way to compress this into a ...
1
vote
1answer
94 views

Find coordinate $y$ of an elliptic curve point

If I have an elliptic curve over a finite filed $F_p$ ($p$ is prime) defined as $$ y^2 \equiv x^3 + ax + b\pmod p,$$ such that $4a^2 + 27b^2 \neq 0$ and suppose I have only given the coordinate $x$, ...
0
votes
1answer
54 views

Understand the English paragraph on association rule.

I am currently studying Association Rule Pattern Mining. I am reading the explanation on wikipedia about it. Somehow, I feel like I have a problem in understanding the paragraph below. Can somebody ...
12
votes
4answers
236 views

How do you create a nonlinear game that the player can always win?

I thought a lot about this question — and initially, I intended to ask this on gamedev.stackexchange.com — but due to its rather theoretical aspects, I think it might be more appropriate to address a ...
5
votes
3answers
2k views

How is math used in computer graphics? [closed]

I'm doing a research paper on the mathematics of computer graphics and animation (3D) and I do not know where to start. What mathematical equations and concepts are used for computer graphics and ...
0
votes
0answers
70 views

Check if there's a cycle in an undirected graph

I'm trying to find an algorithms that checks if there's a cycle in a given undirected graph G=(V,E). But I didn't succeed. Can anyone give me such an algorithm?
2
votes
2answers
407 views

Shortest path between wikipedia articles

I'm trying to figure out whether it is possible (and if so how) to find the shortest path inside a network from one node to another. I know that there are different possible algorithms to do that the ...
1
vote
0answers
21 views

Finding the upper bound of the length of a closed walk

I am having trouble understanding a part of the proof of Lemma 2 (Page 184). It says the length of the tour is $$ \leq \lceil n^{1/2} \rceil + \triangle(n + \lceil n^{1/2} \rceil) + \sqrt{2} $$ I ...
0
votes
1answer
44 views

Reduction between languages in P

I have a simple question about the class P: Is there exist a polynomial time reduction between every two languages A, B in P?
0
votes
1answer
38 views

Do sets require a general equivalence relation over all elements?

and does this mean there cant be sets of things I have not defined equivalency for? This is maybe a weird question and maybe not even a meaningful one, my understanding of sets and such is not ...
1
vote
1answer
68 views

Calculate the probability that at least k of his favourite students are awarded?

Our hero - Maga is going to make a new contest for making the best teams. He is really excited about it. There will be S students in the contest. First N students in the final standings will be ...
0
votes
1answer
225 views

Is there any algorithm (if possible, I need the codes) for Jordan normal form decomposition for large matrices in practice?

Although it is an ill-posed problem as B Kågström said in "An algorithm for numerical computation of the Jordan normal form of a complex matrix", I wonder what people do when they need to do Jordan ...
2
votes
0answers
41 views

Bijection of simple set

Let $X$ is simple set (http://en.wikipedia.org/wiki/Simple_set) $Z \subset X$ is infinite recursive set. $Y = X$ \ $Z$. How to prove that there is a computable bijection $f$ that $x \in X ...
2
votes
0answers
56 views

Turning a cup into a donut: parametrising the continuous deformation

A cup and a donut are topologically equivalent because one can be continuously deformed into another. What if you had a particular cup and a particular donut and wanted to write down (or simulate on a ...
2
votes
1answer
133 views

Time complexity of random algorithm

I was wondering how to perform the complexity analysis of the following random algorithm. The answer are: $\Omega(n)$, $O(n²)$, and $\Theta(n)$. At first I thought to perform the analysis by saying ...
0
votes
1answer
26 views

Proving the following bijection

Let $F = \lbrace S_1, S_2, \dots, S_n \rbrace$, where $S_i \subset \lbrace 1, 2, \dots, 3m\rbrace$ and define a function $f: F \to \mathbb{N}$ by $$ f(S_i) = \sum_{j \in S_i} (n+1)^{3m-j} $$ then ...
5
votes
2answers
347 views

Mathematical concept for formal languages

A formal language is defined as a subset of finite-length strings over an alphabet. It is similar to the mathematical concept "relation", but the lengths of its strings are not fixed. Since the name ...
0
votes
1answer
33 views

Is $ 5^{xf(x)} \in \mathcal O (5^{f(x)}) $?

Intuitively I know that $ 5^{xf(x)} \in \mathcal O (5^{f(x)}) $ but how would I go about proving this? I am at my wit's end on this. $ 5^{xf(x)} \in \mathcal O (5^{f(x)}) \Leftrightarrow \exists c, ...
0
votes
1answer
58 views

Exact calulation of trigonometric functions

My question is a bit related to computer science and I am not quit sure if this place is a good one for it. Let me know if I should move it. So as you know values of functions like sin or cosine can ...
1
vote
0answers
771 views

Calculating time complexity of algorithms written in pseudocode.

Nowadays we are interested to find some algorithms with a prescribed running time. For example if for certain decisional problem $X$ there is an algorithm with running time $O(n^3)$ we try to break ...
1
vote
1answer
76 views

Myhill-Nerode theorem for the language: $L = \left\{ a^n b^n\mid n\ \geq\ 1 \right\}$

I have to use the Myhill-Nerode theorem for the following language: $$L = \left\{ a^n b^n\mid n\ \geq\ 1 \right\}$$ An equivalence relation is the following: $$x \sim y\ \Leftrightarrow \forall\ \ ...
2
votes
3answers
66 views

Strong Induction, assuming k<n where k and n are not numbers

In strong Induction for the induction hypothesis you assume for all K, p(k) for k If for example I am working with trees and not natural numbers can I still use this style of proof? For example if I ...
0
votes
0answers
27 views

Quantization minimizing the quadratic error

I am working on a quantization problem which could be express in these terms : Given a set of positive reals $\{x_1, x_2,\dots,x_M\}$, I need to find another set $\{y_1,y_2,\dots,y_N\}$ of size $N ...
2
votes
0answers
97 views

What connections between computer science and ergodic theory?

I have a background in ergodic theory, but I am switching to computer science/programming. I would like to know if tools from ergodic theory could be useful, especially something around coding of ...
1
vote
1answer
62 views

Designing a context free grammar

I have to design a grammar over the alphabet $\sum=(a,b)$, so that $c^a(\alpha)=c^b(\alpha)$ and the second part $c^a(\alpha)\leq c^b(\alpha)$ , where $\alpha$ is a word and $c^a$ and $c^b $ are ...
1
vote
1answer
61 views

Using rgb triplets in “scalar” math

So I'm reading a computer graphics research paper and I'm confused as to how to interpret certain formulas that are being used. In the paper, a value σ is defined as an RGB triplet. Later on, that ...
12
votes
0answers
569 views

How does a Lehmer Sieve work?

http://en.wikipedia.org/wiki/Lehmer_sieve Apparently a Lehmer Sieve was a mechanical device that used chains and pulleys to factor numbers and solve diophantine equations. It once was able to factor ...
0
votes
1answer
194 views

Number of all finite sequences from a set? [duplicate]

Given a set $\Sigma$ of letters, apply the Kleene star operation to it, and we get $\Sigma^*$, the set of all finite-length sequences from $\Sigma$, called strings (allowing a letter appearing more ...