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 (Darkly)
  • No Skin
Collapse

Chebucto Regional Softball Club

  1. Home
  2. Uncategorized
  3. Today I completed my planning for my summer course for math teachers "Computer Science for Math Teachers"
A forum for discussing and organizing recreational softball and baseball games and leagues in the greater Halifax area.

Today I completed my planning for my summer course for math teachers "Computer Science for Math Teachers"

Scheduled Pinned Locked Moved Uncategorized
28 Posts 10 Posters 179 Views
  • 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.
  • myrmepropagandistF myrmepropagandist

    Example: "How many three-digit integers contain at least one 2?"

    Elegant permutation solution:

    9*10*10 - 8*9*9 = 252

    It's also fun to write a program:

    three_digit=[]
    for i in range(100,1000):
    if "2" in str(i):
    three_digit.append(i)
    print(len(three_digit))

    It's a less trivial problem if you make it: "How many three-digit EVEN integers contain at lest one 2?"

    (but it's still trivial in code. Just add "and i%2==0")

    myrmepropagandistF This user is from outside of this forum
    myrmepropagandistF This user is from outside of this forum
    myrmepropagandist
    wrote last edited by
    #4

    I think one ought to be able to bounce in and out of both ways of seeing the problem seamlessly.

    Use brute force to verify your theory. Use theory to make better brute force.

    E 1 Reply Last reply
    0
    • myrmepropagandistF myrmepropagandist shared this topic
    • myrmepropagandistF myrmepropagandist

      Example: "How many three-digit integers contain at least one 2?"

      Elegant permutation solution:

      9*10*10 - 8*9*9 = 252

      It's also fun to write a program:

      three_digit=[]
      for i in range(100,1000):
      if "2" in str(i):
      three_digit.append(i)
      print(len(three_digit))

      It's a less trivial problem if you make it: "How many three-digit EVEN integers contain at lest one 2?"

      (but it's still trivial in code. Just add "and i%2==0")

      myrmepropagandistF This user is from outside of this forum
      myrmepropagandistF This user is from outside of this forum
      myrmepropagandist
      wrote last edited by futurebird@sauropods.win
      #5

      To start a popular and annoying tangent to this conversation... this is EXACTLY the sort of problem LLMs are terrible at solving. (unless they have been fed multiple correct versions of the solution)

      The LLM will tell you a numerical answer with all the confidence of a god and it will be totally wrong. This understandable if you think about the way that these responses are generated, but to me this alone shows the limits of the system.

      Luci ScissorsB ? 2 Replies Last reply
      0
      • myrmepropagandistF myrmepropagandist

        To start a popular and annoying tangent to this conversation... this is EXACTLY the sort of problem LLMs are terrible at solving. (unless they have been fed multiple correct versions of the solution)

        The LLM will tell you a numerical answer with all the confidence of a god and it will be totally wrong. This understandable if you think about the way that these responses are generated, but to me this alone shows the limits of the system.

        Luci ScissorsB This user is from outside of this forum
        Luci ScissorsB This user is from outside of this forum
        Luci Scissors
        wrote last edited by
        #6

        @futurebird And really, a limit of human psychology that unless you're really really deep in your soul understanding how it works, the confidence will absolutely convince you,

        myrmepropagandistF 1 Reply Last reply
        0
        • myrmepropagandistF myrmepropagandist

          To start a popular and annoying tangent to this conversation... this is EXACTLY the sort of problem LLMs are terrible at solving. (unless they have been fed multiple correct versions of the solution)

          The LLM will tell you a numerical answer with all the confidence of a god and it will be totally wrong. This understandable if you think about the way that these responses are generated, but to me this alone shows the limits of the system.

          ? Offline
          ? Offline
          Guest
          wrote last edited by
          #7

          @futurebird I tried it on a local LLM and it followed the reasoning: determine how many 3 digit numbers there are, use complementary counting for numbers without a 2, and subtract one from the other. I suppose it might appear on its training set, or it might have generalise from similar problems.

          myrmepropagandistF 1 Reply Last reply
          0
          • Luci ScissorsB Luci Scissors

            @futurebird And really, a limit of human psychology that unless you're really really deep in your soul understanding how it works, the confidence will absolutely convince you,

            myrmepropagandistF This user is from outside of this forum
            myrmepropagandistF This user is from outside of this forum
            myrmepropagandist
            wrote last edited by
            #8

            @bri_seven

            I think because this is the kind of problem that a computer can be used to solve with great confidence and accuracy people just assume that LLMs are doing what I've done in writing a program to literally count all of the numbers that meet the condition.

            It's not an absurd error to make... but the LLM is doing no such thing!

            Luci ScissorsB 1 Reply Last reply
            0
            • myrmepropagandistF myrmepropagandist

              Today I completed my planning for my summer course for math teachers "Computer Science for Math Teachers"

              But I'd love to know of any additional topics I ought to include. Main goal is to get the rest of the math faculty comfortable enough with code that they use it in a natural way as one of many problem solving techniques and teach this to our students.

              When my lesson plans have a CS component other math teachers often skip it just because they don't feel comfortable.

              punIssuerP This user is from outside of this forum
              punIssuerP This user is from outside of this forum
              punIssuer
              wrote last edited by
              #9

              @futurebird What are your thoughts on teaching them eg. Haskell? To me, Lambda Calculus feels like a natural gateway between math and programming

              myrmepropagandistF 1 Reply Last reply
              0
              • ? Guest

                @futurebird I tried it on a local LLM and it followed the reasoning: determine how many 3 digit numbers there are, use complementary counting for numbers without a 2, and subtract one from the other. I suppose it might appear on its training set, or it might have generalise from similar problems.

                myrmepropagandistF This user is from outside of this forum
                myrmepropagandistF This user is from outside of this forum
                myrmepropagandist
                wrote last edited by
                #10

                @modulux

                It reproduced text that someone else wrote that walked through the reasoning. It didn't follow it at all.

                1 Reply Last reply
                0
                • myrmepropagandistF myrmepropagandist

                  @bri_seven

                  I think because this is the kind of problem that a computer can be used to solve with great confidence and accuracy people just assume that LLMs are doing what I've done in writing a program to literally count all of the numbers that meet the condition.

                  It's not an absurd error to make... but the LLM is doing no such thing!

                  Luci ScissorsB This user is from outside of this forum
                  Luci ScissorsB This user is from outside of this forum
                  Luci Scissors
                  wrote last edited by
                  #11

                  @futurebird i have noticed that in newest versions of chat-GPT it can indeed write a python program, run it, and give you the results. They charge extra for that capability. also still no guarantees the program it writes is correct

                  myrmepropagandistF 1 Reply Last reply
                  0
                  • Luci ScissorsB Luci Scissors

                    @futurebird i have noticed that in newest versions of chat-GPT it can indeed write a python program, run it, and give you the results. They charge extra for that capability. also still no guarantees the program it writes is correct

                    myrmepropagandistF This user is from outside of this forum
                    myrmepropagandistF This user is from outside of this forum
                    myrmepropagandist
                    wrote last edited by
                    #12

                    @bri_seven

                    So, they've added python to it to some degree do you think? That's interesting.

                    Luci ScissorsB 1 Reply Last reply
                    0
                    • myrmepropagandistF myrmepropagandist

                      @bri_seven

                      So, they've added python to it to some degree do you think? That's interesting.

                      Luci ScissorsB This user is from outside of this forum
                      Luci ScissorsB This user is from outside of this forum
                      Luci Scissors
                      wrote last edited by
                      #13

                      @futurebird it refers to it as “analysis”, it has special specific UI in which you can examine the python program and its output, and optionally download it to run on your own machine- a little like how it presents ui for other external services like image search results, image generation, image description- the llm itself doesn’t do those things but makes it seem like it is

                      myrmepropagandistF sabikS 2 Replies Last reply
                      0
                      • punIssuerP punIssuer

                        @futurebird What are your thoughts on teaching them eg. Haskell? To me, Lambda Calculus feels like a natural gateway between math and programming

                        myrmepropagandistF This user is from outside of this forum
                        myrmepropagandistF This user is from outside of this forum
                        myrmepropagandist
                        wrote last edited by futurebird@sauropods.win
                        #14

                        @punissuer

                        None of our students uses Haskell, and it's just a bit obscure. These are just math teachers who never program anything most of the time. I'm picking python since they will see it most often and it might work its way into their lessons because of that.

                        (I will implement Haskell education for the math teachers when I start teaching the fifth graders Dvorak ... )

                        1 Reply Last reply
                        1
                        0
                        • Luci ScissorsB Luci Scissors

                          @futurebird it refers to it as “analysis”, it has special specific UI in which you can examine the python program and its output, and optionally download it to run on your own machine- a little like how it presents ui for other external services like image search results, image generation, image description- the llm itself doesn’t do those things but makes it seem like it is

                          myrmepropagandistF This user is from outside of this forum
                          myrmepropagandistF This user is from outside of this forum
                          myrmepropagandist
                          wrote last edited by
                          #15

                          @bri_seven

                          Well now I've got to try this too. I always try each new thing to understand it.

                          I mainly use LLMs to clean up my speech-to-text narration or to format lecture notes into lesson plans. They're good when I provide **all** the content, and decent at shortening and clarifying text. That said including the time needed to proofread the output it is only slightly faster than doing it from scratch.

                          1 Reply Last reply
                          0
                          • myrmepropagandistF myrmepropagandist

                            Example: "How many three-digit integers contain at least one 2?"

                            Elegant permutation solution:

                            9*10*10 - 8*9*9 = 252

                            It's also fun to write a program:

                            three_digit=[]
                            for i in range(100,1000):
                            if "2" in str(i):
                            three_digit.append(i)
                            print(len(three_digit))

                            It's a less trivial problem if you make it: "How many three-digit EVEN integers contain at lest one 2?"

                            (but it's still trivial in code. Just add "and i%2==0")

                            Douglas Edwards 🇺🇦🇨🇦🇲🇽🇵🇦🇬🇱🇩🇰🇪🇺D This user is from outside of this forum
                            Douglas Edwards 🇺🇦🇨🇦🇲🇽🇵🇦🇬🇱🇩🇰🇪🇺D This user is from outside of this forum
                            Douglas Edwards 🇺🇦🇨🇦🇲🇽🇵🇦🇬🇱🇩🇰🇪🇺
                            wrote last edited by
                            #16

                            @futurebird Is 8*9*4 just a typo, or are you checking to see how alert we are?

                            9 × 10 × 10 – 8 × 9 × 9 = 252 (correct)

                            9 × 10 × 10 – 8 × 9 × 4 = 612

                            myrmepropagandistF 1 Reply Last reply
                            0
                            • Douglas Edwards 🇺🇦🇨🇦🇲🇽🇵🇦🇬🇱🇩🇰🇪🇺D Douglas Edwards 🇺🇦🇨🇦🇲🇽🇵🇦🇬🇱🇩🇰🇪🇺

                              @futurebird Is 8*9*4 just a typo, or are you checking to see how alert we are?

                              9 × 10 × 10 – 8 × 9 × 9 = 252 (correct)

                              9 × 10 × 10 – 8 × 9 × 4 = 612

                              myrmepropagandistF This user is from outside of this forum
                              myrmepropagandistF This user is from outside of this forum
                              myrmepropagandist
                              wrote last edited by
                              #17

                              @dedicto

                              Thanks!

                              1 Reply Last reply
                              0
                              • Luci ScissorsB Luci Scissors

                                @futurebird it refers to it as “analysis”, it has special specific UI in which you can examine the python program and its output, and optionally download it to run on your own machine- a little like how it presents ui for other external services like image search results, image generation, image description- the llm itself doesn’t do those things but makes it seem like it is

                                sabikS This user is from outside of this forum
                                sabikS This user is from outside of this forum
                                sabik
                                wrote last edited by
                                #18

                                @bri_seven @futurebird
                                Presumably constraining the LLM output to valid python programs at the sampling stage, potentially giving a misleading impression about its capability

                                myrmepropagandistF 1 Reply Last reply
                                0
                                • myrmepropagandistF myrmepropagandist

                                  I think one ought to be able to bounce in and out of both ways of seeing the problem seamlessly.

                                  Use brute force to verify your theory. Use theory to make better brute force.

                                  E This user is from outside of this forum
                                  E This user is from outside of this forum
                                  Matt Panaro
                                  wrote last edited by
                                  #19

                                  @futurebird one thing I've always appreciated in the intersection between coding and computer-science/mathematics is, when you can use a naïve approach initially, to get answers fast; but then have to switch to a more sophisticated algorithm to have any hope of scaling. I'll see if I can come up with some specific examples…

                                  Greg EganG 1 Reply Last reply
                                  0
                                  • E Matt Panaro

                                    @futurebird one thing I've always appreciated in the intersection between coding and computer-science/mathematics is, when you can use a naïve approach initially, to get answers fast; but then have to switch to a more sophisticated algorithm to have any hope of scaling. I'll see if I can come up with some specific examples…

                                    Greg EganG This user is from outside of this forum
                                    Greg EganG This user is from outside of this forum
                                    Greg Egan
                                    wrote last edited by
                                    #20

                                    @eigen @futurebird

                                    Back in the day when computers were rare, if I had to show people who were completely new to coding one simple thing you could program super-easily if you weren’t too worried about efficiency, and then refine to get better scaling, I always took them through a few versions of listing the prime numbers up to N.

                                    myrmepropagandistF 1 Reply Last reply
                                    0
                                    • sabikS sabik

                                      @bri_seven @futurebird
                                      Presumably constraining the LLM output to valid python programs at the sampling stage, potentially giving a misleading impression about its capability

                                      myrmepropagandistF This user is from outside of this forum
                                      myrmepropagandistF This user is from outside of this forum
                                      myrmepropagandist
                                      wrote last edited by
                                      #21

                                      @sabik @bri_seven

                                      A LLM isn't a complier, and unless it has additional special case handling it cannot tell if a python program is valid enough to run.

                                      It can just guess if it looks like programs people in the training text have said were valid and will run.

                                      And perhaps you were aware of this but it's exactly the misconception I keep bumping into with what people ask LLMs to do.

                                      sabikS 1 Reply Last reply
                                      0
                                      • Greg EganG Greg Egan

                                        @eigen @futurebird

                                        Back in the day when computers were rare, if I had to show people who were completely new to coding one simple thing you could program super-easily if you weren’t too worried about efficiency, and then refine to get better scaling, I always took them through a few versions of listing the prime numbers up to N.

                                        myrmepropagandistF This user is from outside of this forum
                                        myrmepropagandistF This user is from outside of this forum
                                        myrmepropagandist
                                        wrote last edited by futurebird@sauropods.win
                                        #22

                                        @gregeganSF @eigen

                                        This activity is much more rewarding if you aren't also teaching what prime number even is at the same time. Though, that's sort of what I've been developing with the fifth graders. Learning about concepts like prime numbers through programming. It's very different from what I'll be doing with the math teachers in the summer.

                                        For the math teachers the prime numbers are a safe anchor they understand and the code is the new thing. For the kids it's all new.

                                        myrmepropagandistF Barry GoldmanB 2 Replies Last reply
                                        0
                                        • myrmepropagandistF myrmepropagandist

                                          Example: "How many three-digit integers contain at least one 2?"

                                          Elegant permutation solution:

                                          9*10*10 - 8*9*9 = 252

                                          It's also fun to write a program:

                                          three_digit=[]
                                          for i in range(100,1000):
                                          if "2" in str(i):
                                          three_digit.append(i)
                                          print(len(three_digit))

                                          It's a less trivial problem if you make it: "How many three-digit EVEN integers contain at lest one 2?"

                                          (but it's still trivial in code. Just add "and i%2==0")

                                          Barry GoldmanB This user is from outside of this forum
                                          Barry GoldmanB This user is from outside of this forum
                                          Barry Goldman
                                          wrote last edited by
                                          #23

                                          @futurebird
                                          len([n for n in range(100,1000) if '2' in str(n)]

                                          this is why python scares me and shouldn't be used for intro programming.

                                          1 Reply Last reply
                                          0

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


                                          • 1
                                          • 2
                                          • Login

                                          • Don't have an account? Register

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