Questions tagged [proof]

A mathematical proof is any mathematical argument which demonstrates the truth of a mathematical statement. Informal proofs are typically rendered in natural language and are held true by consensus; formal proofs are typically rendered symbolically and can be checked mechanically. "Proofs" can be valid or invalid; only the former kind constitutes actual proof, whereas the latter kind usually refers to a flawed attempt at proof.

828 questions
0
votes
3 answers

How can I prove by induction that the second of these two algorithms is faster?

I have two algorithms. A. Solves problem in 2^n seconds. B. Solves problem in n^2 + 1,000,000 seconds. How can I inductively prove that B is faster than A. I'm told that 2^n > 2n+1 for n>2 might be useful for this problem. I've been cracking my…
amorimluc
  • 1,661
  • 5
  • 22
  • 32
0
votes
1 answer

How can I prove the following logic statement deductively?

I have the following logic statement: If (P OR Q) and (P => Q) and (Q => P) Then (P AND Q) I'm told to use Dorothy's Law, which is: If (A => B) Then (A OR B => B) I can't figure out the exact rules of inference and/or laws needed to…
amorimluc
  • 1,661
  • 5
  • 22
  • 32
0
votes
1 answer

compress 2-bit numbers and save 1 bit use compression scheme

I want to create a compression scheme for 2-bit numbers such that it will reduce the size of any sequence by at least one bit. How can I prove this is not possible?
benji_r
  • 535
  • 2
  • 16
  • 34
0
votes
2 answers

Proving an algorithm's correctness in determining the number of 1 bits in a bit string

procedure bit count(S: bit string) count := 0 while S != 0 count := count + 1 S := S ∧ (S − 1) return count {count is the number of 1s in S} Here S-1 is the bit string obtained by changing the rightmost 1 bit of S to a 0…
0
votes
1 answer

Lambda calculus in practice

How to choose a language, a lambda term (λx.y)((λx.xxx)(λx.xxx)) actually calculated? In other words, need a language to the normal order reduction and the weak type system.
0
votes
1 answer

Proof on less than and less or equal on nat

Assuming the following definitions (the first two are taken from http://www.cis.upenn.edu/~bcpierce/sf/Basics.html): Fixpoint beq_nat (n m : nat) : bool := match n with | O => match m with | O => true | S m' => false …
huynhjl
  • 41,520
  • 14
  • 105
  • 158
0
votes
1 answer

Prove binary tree properties using induction

I am having trouble proving binary tree properties using induction: Property 1 - A tree with N internal nodes has a maximum height of N+1 base case - 0 internal nodes has a height of 0 assume - a tree with k internal nodes has a maximum…
Zach Caudle
  • 145
  • 2
  • 13
0
votes
4 answers

How would one know if one saw a random number generator?

I have been reading various articles about random numbers and their generators. There are usually 3 important conclusions that I draw from them: Random numbers are not truly random Much of the time they have a bias (modulo bias) Humans are…
mjgpy3
  • 8,597
  • 5
  • 30
  • 51
0
votes
1 answer

Proving lemma with implication based on functions

I want to prove the lemma below. I am trying to to use tactic 'destruct', but I can't prove it. Please any body guide me how can I prove such lemmas. I can prove it for EmptyString, but not for variables s1 and s2. Thanks Inductive nat :…
Khan
  • 303
  • 2
  • 14
0
votes
1 answer

Proof with big-oh

Just starting to learn big-oh and asymptotic analysis and I am stuck on this particular proof: How can we prove 2^n is O(n!)? Thanks
-1
votes
1 answer

Prove (p → ¬ q) → ¬ (p ∧ q) in Lean4

I get as far as this theorem problem_2 : (p → ¬ q) → ¬ (p ∧ q) := by intro hp intro hpw which gets me to ⊢ False
-1
votes
2 answers

Algorithm to sort an Array, in which every element is 10 positions away from where it should be

What is the most efficient sorting algorithm to sort an Array, that has n elements and EVERY element originally is 10 position away from its position after sorting? I am thinking about insertion sort, but I have no clue how to proof that: (1) It is…
-1
votes
1 answer

Coq begginer here, how to understand the syntax?

I recently started a class on my college where we solve logical problems in Coq. I'm having problems understanding the principles of programming in Coq, the syntax and "building" ideas in my brain when it comes to problems. For instance, Definition…
SD01
  • 1
  • 2
-1
votes
2 answers

Show that the class of decidable languages is closed under the operations of: Complementation, Concatenation, and Intersection

I understand that the problem is asking for a proof for the specified Turing machine. My issue derives from not being able to understand what type of structure this problem is proposing, as indicated below: We say that a class C of languages is…
-1
votes
1 answer

Algebra for bitwise operators

I am trying to prove that a certain equation, with an operation defined for base 10, is equivalent to another operation (with slightly different numbers) that is only defined in base 2 (&, |, etc.). I am trying to prove this through induction, but…