Skip to content

Instantly share code, notes, and snippets.

@jelmervdl
Created April 18, 2023 11:14
Show Gist options
  • Save jelmervdl/14ff67b7e0bbf3b85ec5217f21e9b36f to your computer and use it in GitHub Desktop.
Save jelmervdl/14ff67b7e0bbf3b85ec5217f21e9b36f to your computer and use it in GitHub Desktop.

Language models are not computers. I'd say, they're terrible at reasoning because they can't follow simple instructions correctly. If it can't do this, then why should it be able to do its own logical reasoning?

Jelmer:

Are there more ones or more zeros in the following sequence: 1111111100000111111110000000000

ChatGPT:

To determine whether there are more ones or zeros in the sequence "1111111100000111111110000000000", we can simply count the number of ones and zeros in the sequence and compare them.

Counting the number of ones in the sequence, we get:

1111111100000111111110000000000
11111111------------------- (8 ones)
--------000000111111110000000000 (12 ones)

Total number of ones = 20

Counting the number of zeros in the sequence, we get:

1111111100000111111110000000000
--------00000011--------- (2 zeros)
--------------111111110000000000 (10 zeros)
------------------------ (8 zeros)

Total number of zeros = 20

Therefore, there are an equal number of ones and zeros in the given sequence.

Even when you tell it exactly how to do this, it fails?

Jelmer:

To compute whether there are more ones or zeros in a sequence you do the following: You have a counter, a, set to zero. For every element in the sequence, if the element is 1, you increment Finally, there are more ones in the sequence if a is larger than half of the length of the sequence.
Determine whether there are more ones or zeros in the following sequence: 1111111100000111111110000000000

ChatGPT:

To determine whether there are more ones or zeros in the sequence "1111111100000111111110000000000" using the given method, we need to follow these steps:

  1. Set the counter, a, to zero.
  2. Iterate over each element in the sequence.
  3. If the element is 1, increment the counter, a.
  4. Finally, compare the value of a with half the length of the sequence. If a is larger than half the length of the sequence, there are more ones in the sequence. Otherwise, there are more zeros in the sequence.

Here's the step-by-step computation:

  1. Set the counter, a, to zero: a = 0
  2. Iterate over each element in the sequence:
  • Element 1: Increment a, a = 1
  • Element 1: Increment a, a = 2
  • Element 1: Increment a, a = 3
  • Element 1: Increment a, a = 4
  • Element 1: Increment a, a = 5
  • Element 1: Increment a, a = 6
  • Element 1: Increment a, a = 7
  • Element 1: Increment a, a = 8
  • Element 0: Do not increment a, a = 8
  • Element 0: Do not increment a, a = 8
  • Element 0: Do not increment a, a = 8
  • Element 0: Do not increment a, a = 8
  • Element 0: Do not increment a, a = 8
  • Element 1: Increment a, a = 9
  • Element 1: Increment a, a = 10
  • Element 1: Increment a, a = 11
  • Element 1: Increment a, a = 12
  • Element 1: Increment a, a = 13
  • Element 1: Increment a, a = 14
  • Element 0: Do not increment a, a = 14
  • Element 0: Do not increment a, a = 14
  • Element 0: Do not increment a, a = 14
  • Element 0: Do not increment a, a = 14
  1. Compare the value of a with half the length of the sequence (which is 20/2 = 10). Since a (which is 14) is larger than half the length of the sequence, there are more ones in the sequence.

Therefore, according to the given method, there are more ones than zeros in the sequence "1111111100000111111110000000000".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment