Writing Natural Numbers: A Unique Expression Using Powers of 2 and Odd Numbers

Click For Summary

Discussion Overview

The discussion revolves around expressing any natural number n uniquely as one less than a power of 2 times an odd number. Participants explore the formulation of functions f(n) and g(n) that would satisfy this representation, considering the implications for primitive recursive functions and computational models.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant proposes a formula for n as 1 less than a power of 2 times an odd number, introducing a modified difference function.
  • Another suggests adding one to n and expressing the result similarly, indicating that examples could clarify the concept.
  • A different participant considers defining f(n) in terms of a function z(n) that maps all n to 0, while expressing g(n) as n/2 + 1, noting challenges in proving these functions are primitive recursive.
  • Another participant suggests using Turing machines to simplify the problem, proposing f(n) as the floor of n/2 and discussing the need for an inductive definition.
  • One participant confirms that floor(n/2) is the quotient of n divided by 2, asserting that this quotient function is primitive recursive.
  • Another participant encourages examining the sequence of f(n) for insights and suggests setting up a recursion for f(n) based on its properties.
  • A question is raised about the relevance of Turing machines in this context, given the skipped chapters in their studies.
  • One participant reflects on the equivalence of primitive recursive functions and Turing computable functions, asserting that an algorithm exists for computing f(n) and g(n) that terminates for every output.
  • A participant expresses frustration and fatigue after spending several hours on the problem, indicating a desire to move on to other homework.

Areas of Agreement / Disagreement

Participants express various approaches and ideas regarding the functions f(n) and g(n), but there is no consensus on the best method to express these functions as primitive recursive or the overall approach to the problem.

Contextual Notes

There are unresolved questions regarding the definitions and properties of the functions involved, particularly concerning the primitive recursive nature of certain expressions and the implications of computational models.

gravenewworld
Messages
1,129
Reaction score
27
How can one write any natural number n in one and only one way as 1 less than a power of 2 times an odd number?

n=2^f(n)(2g(n)-1)-1


where the red minus is the modified difference function, i.e. x-y =x-y if x>=y or x-y=0 if x<y
 
Last edited:
Physics news on Phys.org
By adding one to n, and expressing the result as a power of 2 times an odd number!

It's fairly simple -- just do a few random examples, and all should be made clear.
 
I could let f(n)=z(n) where z(n) is the function that takes all n to 0 and let g(n)=n/2+1. That works, but my problem is that this is the 1st step of 1 problem. I have to be able in the end to show that f(n) and g(n) are primitive recursive, and I have learned of no way thus far to express things like n/2 as a primitive recursive function.
 
I guess you haven't gotten to turing machines yet -- I think that would make this fairly easy.


Let's start with f(n) = floor(n/2), I suppose.


What you need, I think, is to find a way to write this function inductively.

Or...

Can you write a primitive recursive function g(x, y) that is 1 if and only if 2x = y or 2x+1 = y? Then couldn't you use g, somehow, to express f?
 
floor(n/2) is just the quotient of dividing n by 2 right?

quo(n,2)=floor(n/2) and I know quo is PR.
 
Hrm.

Have you looked at the actual sequence f(n)? Maybe that would suggest an approach.


Or, you could look at setting up a recursion for f(n). For example, f(2n+1)=2f(n) gives you half the values. (Or something like that -- I think I have an off by one or two error)
 
how would learning about turing machines help in this case? (because we have skipped over chapters)
 
Well, if I recall correctly (and I might not), the class of primitive recursive functions is the same as the (Turing) computable functions.

It's fairly easy to present an algorithm for computing f(n) and g(n) that terminates on every output, so the functions are (Turing) computable.
 
Ahhh I give up on this problem. I already spent 4+ hours on it. Its 330 am and have way to much other homework to do.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 25 ·
Replies
25
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K