Results 1 to 5 of 5

Math Help - Nth term for integers resulting from an algorithm...

  1. #1
    Member
    Joined
    Nov 2006
    Posts
    126

    Nth term for integers resulting from an algorithm...

    That's the best title i could do that's descriptive...

    Here is the algorithm..

    Step 1: Input a positive integer n
    Step 2: Draw a graph consisting of n vertices and no arcs.
    Step 3: Create a new vertex and join it directly to every vertex of order 0.
    Step 4: Create a new vertex and join it directly to every vertex of odd order.
    Step 5: Stop.

    I put in the integers 1 to 5 in the algorithm and got the results of the number of arcs as...

    n=1, a=3
    n=2, a=4
    n=3, a=7
    n=4, a=8
    n=5, a=11

    The question asks:

    State how many arcs are in the graphs that results when the algorithm is applied to a set of n vertices.

    So basically the question is asking what is the nth term of these numbers:

    3, 4, 7, 8, 11

    Please could someone help me understand the method of how they got the nth term?

    Thanks guys!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by anthmoo View Post
    That's the best title i could do that's descriptive...

    Here is the algorithm..

    Step 1: Input a positive integer n
    Step 2: Draw a graph consisting of n vertices and no arcs.
    Step 3: Create a new vertex and join it directly to every vertex of order 0.
    Step 4: Create a new vertex and join it directly to every vertex of odd order.
    Step 5: Stop.

    I put in the integers 1 to 5 in the algorithm and got the results of the number of arcs as...

    n=1, a=3
    n=2, a=4
    n=3, a=7
    n=4, a=8
    n=5, a=11

    The question asks:

    State how many arcs are in the graphs that results when the algorithm is applied to a set of n vertices.

    So basically the question is asking what is the nth term of these numbers:

    3, 4, 7, 8, 11

    Please could someone help me understand the method of how they got the nth term?

    Thanks guys!
    Suppose n is odd.

    at step 2 there are n verts of order 0
    at step 3 there is 1 vert of order n, and n or order 1
    at step 4 there are 2 verts of order n+1, and n of order 2.

    Total or orders at step 5=2(n+1)+2n=4n+2

    Number of arcs is half the sum of the orders so a=2n+1.

    Suppose n is even.

    at step 2 there are n verts of order 0
    at step 3 there is 1 vert of order n, and n or order 1
    at step 4 there are 2 verts of order n, and n of order 2.

    Total or orders at step 5=2n+2n=4n

    Number of arcs is half the sum of the orders so a=2n.

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Nov 2006
    Posts
    126
    Thankyou! But...

    Is there no possible way for there to be one nth term for this sequence??
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by anthmoo View Post
    Thankyou! But...

    Is there no possible way for there to be one nth term for this sequence??
    if n is odd ceil(n/2)-floor(n/2)=1
    and if n even ceil(n/2)-floor(n/2)=0

    we may write:

    a=2n+ceil(n/2)-floor(n/2)

    RonL

    (ceiling function ceil(x) is the smallest integer greater than or equal to
    x, and the floor function floor(x) is the largest integer less than or equal to
    x).
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Nov 2006
    Posts
    126
    Quote Originally Posted by CaptainBlack View Post
    if n is odd ceil(n/2)-floor(n/2)=1
    and if n even ceil(n/2)-floor(n/2)=0

    we may write:

    a=2n+ceil(n/2)-floor(n/2)

    RonL

    (ceiling function ceil(x) is the smallest integer greater than or equal to
    x, and the floor function floor(x) is the largest integer less than or equal to
    x).
    Thankyou very much man! I didn't know much about the floor/ceiling function, I figured it was a lot more complicated than that!

    Thanks man!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. finding the volume of the resulting ring..
    Posted in the Calculus Forum
    Replies: 1
    Last Post: May 4th 2010, 04:57 PM
  2. Replies: 5
    Last Post: December 10th 2009, 04:47 AM
  3. more volume of resulting solid
    Posted in the Calculus Forum
    Replies: 1
    Last Post: August 7th 2009, 10:56 AM
  4. volume of resulting solid
    Posted in the Calculus Forum
    Replies: 1
    Last Post: August 7th 2009, 10:14 AM
  5. Algorithm and Integers problem
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: September 21st 2008, 06:33 PM

Search Tags


/mathhelpforum @mathhelpforum