Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Are You Smarter Than A Sixth Grader (Taking Seventh Grade Math)?

Are You Smarter Than A Sixth Grader (Taking Seventh Grade Math)?

Scheduled Pinned Locked Moved The Lounge
htmlcomhelpquestion
21 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Bassam Abdul Baki

    But you can only start with one step.

    Web - BM - RSS - Math - LinkedIn

    G Offline
    G Offline
    gardnerp
    wrote on last edited by
    #11

    That's completely irrelevant. 761 => 1U, 2R, 3R, 4R, 5R, 6U, 7U. 752 => 1R, 2U, 3R, 4R, 5U, 6R, 7U. 743 => 1R, 2R, 3U, 4U, 5R, 6R, 7U. 7412 => 1U, 2U, 3R, 4U, 5R, 6U, 7U. .... Follow my previous post. Simply put the 1 first instead of the order I have. I have them in a more mathematical order that I used to split the numbers into the two groups. Order does not matter.

    B 1 Reply Last reply
    0
    • G gardnerp

      That's completely irrelevant. 761 => 1U, 2R, 3R, 4R, 5R, 6U, 7U. 752 => 1R, 2U, 3R, 4R, 5U, 6R, 7U. 743 => 1R, 2R, 3U, 4U, 5R, 6R, 7U. 7412 => 1U, 2U, 3R, 4U, 5R, 6U, 7U. .... Follow my previous post. Simply put the 1 first instead of the order I have. I have them in a more mathematical order that I used to split the numbers into the two groups. Order does not matter.

      B Offline
      B Offline
      Bassam Abdul Baki
      wrote on last edited by
      #12

      My bad. I missed a pair. :doh: :-O

      Web - BM - RSS - Math - LinkedIn

      T 1 Reply Last reply
      0
      • B Bassam Abdul Baki

        What 8?

        Web - BM - RSS - Math - LinkedIn

        C Offline
        C Offline
        Corporal Agarn
        wrote on last edited by
        #13

        7 8 9

        Mongo: Mongo only pawn... in game of life.

        1 Reply Last reply
        0
        • B Bassam Abdul Baki

          Homework problem. Q: On the (x,y) coordinate system, you start at (0,0) and want to get to (14,14). At each step n, you move exactly n steps either right or up. So initially, you can only move 1 unit right or up, then 2, then 3, etc. How many paths are there to (14,14)? A: He got one on his own and he understood the symmetry and got 2. I told him my answer and why. Anyone wants to try?

          Web - BM - RSS - Math - LinkedIn

          V Offline
          V Offline
          VuduDog
          wrote on last edited by
          #14

          I guess I missed something. I thought 'n' was a specific number to be repeated at each step so the answer would be only the factors of 14. Therefore only these 'n' steps would be allowed. 1,2,7, and 14 - 2R, 2U, etc... or 7R,7U ... So the number of paths would be 4

          1 Reply Last reply
          0
          • B Bassam Abdul Baki

            Homework problem. Q: On the (x,y) coordinate system, you start at (0,0) and want to get to (14,14). At each step n, you move exactly n steps either right or up. So initially, you can only move 1 unit right or up, then 2, then 3, etc. How many paths are there to (14,14)? A: He got one on his own and he understood the symmetry and got 2. I told him my answer and why. Anyone wants to try?

            Web - BM - RSS - Math - LinkedIn

            B Offline
            B Offline
            BinaryReason
            wrote on last edited by
            #15

            At each point you can move either right or up. The setup makes the step sizes irrelevant to the problem - they will always add to 28 (14 horizontal + 14 vertical), (1 + 2 + 3 + 4 + 5 + 6 + 7). That means we will reach (14,14) from (0,0) in exactly 7 steps. At each of the 7 steps you can either move right or up, so you have two choices at every step node. The answer then becomes: 2^7 = 128 possible paths. If you were to visualize it, you would simply draw a complete grid between (0,0) and (14,14)

            "There are only 10 types of people in the world - those who know binary and those who don't."

            1 Reply Last reply
            0
            • B Bassam Abdul Baki

              My bad. I missed a pair. :doh: :-O

              Web - BM - RSS - Math - LinkedIn

              T Offline
              T Offline
              TedFalasco
              wrote on last edited by
              #16

              Ha ha, I did too. I was with you all the way. I was all, "Yeah, you tell 'im, Bassam!" Until you said that and I rechecked my answers. :sigh:

              B 1 Reply Last reply
              0
              • T TedFalasco

                Ha ha, I did too. I was with you all the way. I was all, "Yeah, you tell 'im, Bassam!" Until you said that and I rechecked my answers. :sigh:

                B Offline
                B Offline
                Bassam Abdul Baki
                wrote on last edited by
                #17

                To err is human. To umm is herman.

                Web - BM - RSS - Math - LinkedIn

                1 Reply Last reply
                0
                • B Bassam Abdul Baki

                  Homework problem. Q: On the (x,y) coordinate system, you start at (0,0) and want to get to (14,14). At each step n, you move exactly n steps either right or up. So initially, you can only move 1 unit right or up, then 2, then 3, etc. How many paths are there to (14,14)? A: He got one on his own and he understood the symmetry and got 2. I told him my answer and why. Anyone wants to try?

                  Web - BM - RSS - Math - LinkedIn

                  S Offline
                  S Offline
                  scott mankowitz
                  wrote on last edited by
                  #18

                  Shouldn't it be 16? If there are 8 distinct groups of 3-4 numbers that sum to 14, one path will start with the first move going up and the next will start with the first move going right. Incidentally, here is my code:

                  function combine(a, min) {
                  var fn = function(n, src, got, all) {
                  if (n == 0) {
                  if (got.length > 0) {
                  all[all.length] = got;
                  }
                  return;
                  }
                  for (var j = 0; j < src.length; j++) {
                  fn(n - 1, src.slice(j + 1), got.concat([src[j]]), all);
                  }
                  return;
                  }
                  var all = [];
                  for (var i = min; i < a.length; i++) {
                  fn(i, a, [], all);
                  }
                  all.push(a);
                  return all;
                  }

                  function arr_sum(arr) {
                  var n = 0;
                  for (var i = 0; i < arr.length; i++) {
                  n += arr[i];
                  }
                  return n;
                  }
                  k=[1,2,3,4,5,6,7];
                  combine(k, 1).filter(function(v, i) {
                  return 14 == arr_sum(v)
                  })

                  B 1 Reply Last reply
                  0
                  • S scott mankowitz

                    Shouldn't it be 16? If there are 8 distinct groups of 3-4 numbers that sum to 14, one path will start with the first move going up and the next will start with the first move going right. Incidentally, here is my code:

                    function combine(a, min) {
                    var fn = function(n, src, got, all) {
                    if (n == 0) {
                    if (got.length > 0) {
                    all[all.length] = got;
                    }
                    return;
                    }
                    for (var j = 0; j < src.length; j++) {
                    fn(n - 1, src.slice(j + 1), got.concat([src[j]]), all);
                    }
                    return;
                    }
                    var all = [];
                    for (var i = min; i < a.length; i++) {
                    fn(i, a, [], all);
                    }
                    all.push(a);
                    return all;
                    }

                    function arr_sum(arr) {
                    var n = 0;
                    for (var i = 0; i < arr.length; i++) {
                    n += arr[i];
                    }
                    return n;
                    }
                    k=[1,2,3,4,5,6,7];
                    combine(k, 1).filter(function(v, i) {
                    return 14 == arr_sum(v)
                    })

                    B Offline
                    B Offline
                    Bassam Abdul Baki
                    wrote on last edited by
                    #19

                    No. You always start with 1 step.

                    Web - BM - RSS - Math - LinkedIn

                    S 1 Reply Last reply
                    0
                    • B Bassam Abdul Baki

                      No. You always start with 1 step.

                      Web - BM - RSS - Math - LinkedIn

                      S Offline
                      S Offline
                      scott mankowitz
                      wrote on last edited by
                      #20

                      I think there are 16 distinct paths, as below R1U2R3R4U5R6U7 U1R2U3U4R5U6R7 R1R2U3U4R5R6U7 U1U2R3R4U5U6R7 R1R2U3R4U5U6R7 U1U2R3U4R5R6U7 U1U2R3U4R5R6U7 R1R2U3R4U5U6R7 U1U2R3R4U5U6R7 R1R2U3U4R5R6U7 U1R2U3U4R5U6R7 R1U2R3R4U5R6U7 R1U2U3U4U5R6R7 U1R2R3R4R5U6U7

                      B 1 Reply Last reply
                      0
                      • S scott mankowitz

                        I think there are 16 distinct paths, as below R1U2R3R4U5R6U7 U1R2U3U4R5U6R7 R1R2U3U4R5R6U7 U1U2R3R4U5U6R7 R1R2U3R4U5U6R7 U1U2R3U4R5R6U7 U1U2R3U4R5R6U7 R1R2U3R4U5U6R7 U1U2R3R4U5U6R7 R1R2U3U4R5R6U7 U1R2U3U4R5U6R7 R1U2R3R4U5R6U7 R1U2U3U4U5R6R7 U1R2R3R4R5U6U7

                        B Offline
                        B Offline
                        Bassam Abdul Baki
                        wrote on last edited by
                        #21

                        Some dupes. First and third to last, for example.

                        Web - BM - RSS - Math - LinkedIn

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups