News:

The moderation team is holding a poll on the topic of the site's connection to Scratch. More details can be found here. Your feedback is appreciated.

Main Menu

If this gets a post ID of 32768, we advance!

Started by solitaire, Dec 29, 2021, 11:00:10 PM

Previous topic - Next topic

are you a cat or a dog person

cats
6 (42.9%)
dogs
3 (21.4%)
hamsters
1 (7.1%)
birds
2 (14.3%)
lizards
2 (14.3%)

Total Members Voted: 14

sparkycinnamon

I'm sparkycinnamon (formerly known as cheesyfriedeggs), but you can call me Cheesy, Spark, or Pipes. I like a lot of things, but the fandoms I am fixating on the most at the moment are object shows, Alphabet Lore, and KaBlam!.
non-binary (they/them but she/her is fine if we're close / oriented aroace / click here for some stuff about me / ;)

Gilbert189

Fun fact: Every dice that follows "all opposite sides sums to 7" will always have a 1-2-3 group that look like this:

or this:

PkmnQ

Quote from: gilbert_given_TBGFun fact: Every dice that follows "all opposite sides sums to 7" will always have a 1-2-3 group that look like this:

or this:
Yeah, because after placing the 1 and 2, you can only put the 3 to the left (second image) or the right (first image).
Quickly, I must save the Q's!
Project EAPIDTOTT2TTNO's current target: 4n topic
A cool kid quietly measures the distance in the banquet (5). :/ B)
On a journey to a new domain full of enrichment, With auras and curses for your entertainment, The concept of collectibles spent to unblock your path, Is stretched far to create an interesting aftermath. The ideas start simple at their most plain, Followed by golden power breaking constraints, Along with barriers to check you've cleared things out, Although double vision puts their power in doubt. Why raise up when you can instead replace, And why take just some when you can completely erase? Replacing with nothing may sound like obliteration, But there's a good reason for its differentiation. Special colors that melt, fortify, and wash, And blockages not even gold can squash, A loft rumored to be haunted by a certain curse, And a metal whose purity demonstrates its worth. You've just reached amounts less than none, One thing is clear: It has only just begun.
Tip: Use c͢ombining cha͊racters, because ye᷂s.
Quine list

Threads that I think should be played more: link chain Pre-posted Destruction
Scripts: The sky is the limit

PkmnQ

#1454
D1Q6-331B just a copy of Queue
Quickly, I must save the Q's!
Project EAPIDTOTT2TTNO's current target: 4n topic
A cool kid quietly measures the distance in the banquet (5). :/ B)
On a journey to a new domain full of enrichment, With auras and curses for your entertainment, The concept of collectibles spent to unblock your path, Is stretched far to create an interesting aftermath. The ideas start simple at their most plain, Followed by golden power breaking constraints, Along with barriers to check you've cleared things out, Although double vision puts their power in doubt. Why raise up when you can instead replace, And why take just some when you can completely erase? Replacing with nothing may sound like obliteration, But there's a good reason for its differentiation. Special colors that melt, fortify, and wash, And blockages not even gold can squash, A loft rumored to be haunted by a certain curse, And a metal whose purity demonstrates its worth. You've just reached amounts less than none, One thing is clear: It has only just begun.
Tip: Use c͢ombining cha͊racters, because ye᷂s.
Quine list

Threads that I think should be played more: link chain Pre-posted Destruction
Scripts: The sky is the limit

Byron_Inc_TBG

#1455
Quote from: PkmnQi accidentally created a math problem

how many 10-digit numbers contain both 20 and 25 in them

So, permutation?
Since 20 and 25 are locked together, we can consider them as 1 digit (like when you were to solve "how many numbers contain both 2 and 7")


Let's try observing smaller numbers to see if we can sense a pattern.
4 digits: 2025, 2520 (2P2 = 2 choices)
It's quite simple here, there are only two options since you can't mix in other digits.


5 digits: a2025, a2520, 2025a, 20a25, 25a20, 2520a (3P2 * 10 - 2 = 58 choices)
Things start to get complicated, but not quite complicated enough.
There are 3P2 = 6 ways to put in numbers, and digit a can be any number between 0 and 9 (10 digits)
We have to subtract by 2 since digit a cannot be 0 in a2025 and a2520 (those are 4 digit numbers, not 5)


6 digits: ab2025, ab2520, a2025b, a2520b, a20b25, a25b20, 2025ab, 2520ab, 20ab25, 25ab20, 20a25b, 25a20b (4P2 * 10 * 10 - 3P2 * 10 - 3P2 = 1134)
Oh yeah, things start to really get bad here.
We start off by multiplying 4P2 = 12 methods by 10 * 10 = 100 ways to fill in digits a and b.
Then, we subtract 3P2 * 10 since we can't have a heading 0 in ab2025, ab2520, a2025b, a2520b, a20b25, a25b20 (Since we need a to be in front, it's a sorting between "20", "25", and b, thus 3P2)
After that, we have 3P2 = 6 numbers that fall into two categories: 202025 (ab2025 & 20ab25), 202520 (ab2520 & 2025ab), 202525 (2025ab & 20ab25), 252020 (2520ab & 25ab20), 252025 (ab2025 & 2520ab), 252520 (25ab20 & ab2520)


7 digits: abc2025, abc2520, ab20c25, ab25c20, ab2025c, ab2520c, a20b25c, a25b20c, a2025bc, a2520bc, a20bc25, a25bc20, 2025abc, 2520abc, 20a25bc, 25a20bc, 20ab25c, 25ab20c, 20abc25, 25abc20 (5P2 * 1000 - 4P2 * 10 * 10 - 4P2 * 10 * 2 = 18566)
Oh boy, I'm so very confused.
You get the drill, 5P2 = 20 methods multiplied by 10^3 = 1000 is equal to 20000.
Then we exclude the ones where a is in front and equal to 0 (4P2 * 10^2 = 1200)
We also don't want to include repeats. This is calculated by adding an extra pair, making the number of options 4, thus we do 4P2. We also multiply it by 2, since this extra pair can be both 20 and 25.
However, we double-excluded some numbers, like 0202025.



I quit solving this mathematically, so here's some code for you
Note that tio.run can't handle this thing, so you might need to run it in an IDLE.

ans = []
for i in range(int(1e10), int(1e11)):
if "20" in str(i) and "25" in str(i):
ans.append(i)

print(len(ans))
print(ans)
bomb

TonyBrown148

*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0


TonyBrown148

#1458
89% correct on fashion mnist
*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0

Byron_Inc_TBG

dang you need to be 18 or older to use openai
bomb

PkmnQ

Quote from: Byron_Inc_TBG
Quote from: PkmnQi accidentally created a math problem

how many 10-digit numbers contain both 20 and 25 in them

So, permutation?
Since 20 and 25 are locked together, we can consider them as 1 digit (like when you were to solve "how many numbers contain both 2 and 7")


Let's try observing smaller numbers to see if we can sense a pattern.
4 digits: 2025, 2520 (2P2 = 2 choices)
It's quite simple here, there are only two options since you can't mix in other digits.


5 digits: a2025, a2520, 2025a, 20a25, 25a20, 2520a (3P2 * 10 - 2 = 58 choices)
Things start to get complicated, but not quite complicated enough.
There are 3P2 = 6 ways to put in numbers, and digit a can be any number between 0 and 9 (10 digits)
We have to subtract by 2 since digit a cannot be 0 in a2025 and a2520 (those are 4 digit numbers, not 5)


6 digits: ab2025, ab2520, a2025b, a2520b, a20b25, a25b20, 2025ab, 2520ab, 20ab25, 25ab20, 20a25b, 25a20b (4P2 * 10 * 10 - 3P2 * 10 - 3P2 = 1134)
Oh yeah, things start to really get bad here.
We start off by multiplying 4P2 = 12 methods by 10 * 10 = 100 ways to fill in digits a and b.
Then, we subtract 3P2 * 10 since we can't have a heading 0 in ab2025, ab2520, a2025b, a2520b, a20b25, a25b20 (Since we need a to be in front, it's a sorting between "20", "25", and b, thus 3P2)
After that, we have 3P2 = 6 numbers that fall into two categories: 202025 (ab2025 & 20ab25), 202520 (ab2520 & 2025ab), 202525 (2025ab & 20ab25), 252020 (2520ab & 25ab20), 252025 (ab2025 & 2520ab), 252520 (25ab20 & ab2520)


7 digits: abc2025, abc2520, ab20c25, ab25c20, ab2025c, ab2520c, a20b25c, a25b20c, a2025bc, a2520bc, a20bc25, a25bc20, 2025abc, 2520abc, 20a25bc, 25a20bc, 20ab25c, 25ab20c, 20abc25, 25abc20 (5P2 * 1000 - 4P2 * 10 * 10 - 4P2 * 10 * 2 = 18566)
Oh boy, I'm so very confused.
You get the drill, 5P2 = 20 methods multiplied by 10^3 = 1000 is equal to 20000.
Then we exclude the ones where a is in front and equal to 0 (4P2 * 10^2 = 1200)
We also don't want to include repeats. This is calculated by adding an extra pair, making the number of options 4, thus we do 4P2. We also multiply it by 2, since this extra pair can be both 20 and 25.
However, we double-excluded some numbers, like 0202025.



I quit solving this mathematically, so here's some code for you
Note that tio.run can't handle this thing, so you might need to run it in an IDLE.

ans = []
for i in range(int(1e10), int(1e11)):
if "20" in str(i) and "25" in str(i):
ans.append(i)

print(len(ans))
print(ans)
I tried a haskell program, it almost crashed my computer
Quickly, I must save the Q's!
Project EAPIDTOTT2TTNO's current target: 4n topic
A cool kid quietly measures the distance in the banquet (5). :/ B)
On a journey to a new domain full of enrichment, With auras and curses for your entertainment, The concept of collectibles spent to unblock your path, Is stretched far to create an interesting aftermath. The ideas start simple at their most plain, Followed by golden power breaking constraints, Along with barriers to check you've cleared things out, Although double vision puts their power in doubt. Why raise up when you can instead replace, And why take just some when you can completely erase? Replacing with nothing may sound like obliteration, But there's a good reason for its differentiation. Special colors that melt, fortify, and wash, And blockages not even gold can squash, A loft rumored to be haunted by a certain curse, And a metal whose purity demonstrates its worth. You've just reached amounts less than none, One thing is clear: It has only just begun.
Tip: Use c͢ombining cha͊racters, because ye᷂s.
Quine list

Threads that I think should be played more: link chain Pre-posted Destruction
Scripts: The sky is the limit

TonyBrown148

Quote from: Byron_Inc_TBGI quit solving this mathematically, so here's some code for you
Note that tio.run can't handle this thing, so you might need to run it in an IDLE.
Use dynamic programming.
*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0

TonyBrown148

Let f(n,m) be the number of n-digit numbers ending with m that does not contain 20.
Let g(n,m) be the number of n-digit numbers ending with m that does not contain 25.
Let h(n,m) be the number of n-digit numbers ending with m that does not contain 20 or 25.
Then the answer is (total numbers)-f-g+h.
*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0

PkmnQ

#1463
56000000 - 2100000 + 10400 - (15600 + 10) + 0 - 20 = 53894770

I think that's the answer. There are 53894770 10-digit numbers with both 20 and 25 in them. I'm glad it wasn't asking about 23 and 32.
Quickly, I must save the Q's!
Project EAPIDTOTT2TTNO's current target: 4n topic
A cool kid quietly measures the distance in the banquet (5). :/ B)
On a journey to a new domain full of enrichment, With auras and curses for your entertainment, The concept of collectibles spent to unblock your path, Is stretched far to create an interesting aftermath. The ideas start simple at their most plain, Followed by golden power breaking constraints, Along with barriers to check you've cleared things out, Although double vision puts their power in doubt. Why raise up when you can instead replace, And why take just some when you can completely erase? Replacing with nothing may sound like obliteration, But there's a good reason for its differentiation. Special colors that melt, fortify, and wash, And blockages not even gold can squash, A loft rumored to be haunted by a certain curse, And a metal whose purity demonstrates its worth. You've just reached amounts less than none, One thing is clear: It has only just begun.
Tip: Use c͢ombining cha͊racters, because ye᷂s.
Quine list

Threads that I think should be played more: link chain Pre-posted Destruction
Scripts: The sky is the limit

Byron_Inc_TBG

#1464
Quote from: PkmnQ
Quote from: Byron_Inc_TBG
Quote from: PkmnQi accidentally created a math problem

how many 10-digit numbers contain both 20 and 25 in them

So, permutation?
Since 20 and 25 are locked together, we can consider them as 1 digit (like when you were to solve "how many numbers contain both 2 and 7")


Let's try observing smaller numbers to see if we can sense a pattern.
4 digits: 2025, 2520 (2P2 = 2 choices)
It's quite simple here, there are only two options since you can't mix in other digits.


5 digits: a2025, a2520, 2025a, 20a25, 25a20, 2520a (3P2 * 10 - 2 = 58 choices)
Things start to get complicated, but not quite complicated enough.
There are 3P2 = 6 ways to put in numbers, and digit a can be any number between 0 and 9 (10 digits)
We have to subtract by 2 since digit a cannot be 0 in a2025 and a2520 (those are 4 digit numbers, not 5)


6 digits: ab2025, ab2520, a2025b, a2520b, a20b25, a25b20, 2025ab, 2520ab, 20ab25, 25ab20, 20a25b, 25a20b (4P2 * 10 * 10 - 3P2 * 10 - 3P2 = 1134)
Oh yeah, things start to really get bad here.
We start off by multiplying 4P2 = 12 methods by 10 * 10 = 100 ways to fill in digits a and b.
Then, we subtract 3P2 * 10 since we can't have a heading 0 in ab2025, ab2520, a2025b, a2520b, a20b25, a25b20 (Since we need a to be in front, it's a sorting between "20", "25", and b, thus 3P2)
After that, we have 3P2 = 6 numbers that fall into two categories: 202025 (ab2025 & 20ab25), 202520 (ab2520 & 2025ab), 202525 (2025ab & 20ab25), 252020 (2520ab & 25ab20), 252025 (ab2025 & 2520ab), 252520 (25ab20 & ab2520)


7 digits: abc2025, abc2520, ab20c25, ab25c20, ab2025c, ab2520c, a20b25c, a25b20c, a2025bc, a2520bc, a20bc25, a25bc20, 2025abc, 2520abc, 20a25bc, 25a20bc, 20ab25c, 25ab20c, 20abc25, 25abc20 (5P2 * 1000 - 4P2 * 10 * 10 - 4P2 * 10 * 2 = 18566)
Oh boy, I'm so very confused.
You get the drill, 5P2 = 20 methods multiplied by 10^3 = 1000 is equal to 20000.
Then we exclude the ones where a is in front and equal to 0 (4P2 * 10^2 = 1200)
We also don't want to include repeats. This is calculated by adding an extra pair, making the number of options 4, thus we do 4P2. We also multiply it by 2, since this extra pair can be both 20 and 25.
However, we double-excluded some numbers, like 0202025.



I quit solving this mathematically, so here's some code for you
Note that tio.run can't handle this thing, so you might need to run it in an IDLE.

ans = []
for i in range(int(1e10), int(1e11)):
if "20" in str(i) and "25" in str(i):
ans.append(i)

print(len(ans))
print(ans)
I tried a haskell program, it almost crashed my computer
i threw it to replit
let's see how can it handle
bomb

Gilbert189

#1465
Quote from: PkmnQi accidentally created a math problem

how many 10-digit numbers contain both 20 and 25 in them

I'm gonna try to solve it. Let's observe a number that met this condition.
3120542503
If we mark 20 and 25:
3120542503
we see that 20 and 25 looks like it separates the numbers into what looks like 3 chunks. Thus, we can define this as shown below.
AXBXC
We define 20 and 25 as X, since they are both the same size, however we have to double the possibilities later. However, we can't do the same with A, B, and C, since reordering it will generate a different number (think 3120525403 and 3120403255)
What we can do though is omit X, leaving us with ABC. This gives us a 6 digit number, which we can calculate the amount of possible numbers thereof.
315403
Assuming trailing zeros aren't allowed, this leaves us with 10^6-10^5 = 900000 6-digit numbers.

Now, we need to "cut" this 6-digit number to put back X. This is essentially that sticks and stones problem.
31X54X03
With 6 stones (digits) and 2 sticks (X), we get ((6,2)) = 7C2 = 7!/(2!*5!) = 7*6*5!/(2*5!) = 7*3 = 21 possibilities of putting 2 Xes into ABC.

Combining these possibilities together, we get 900000*21*2 = 37800000 numbers. I guess.

TonyBrown148

#1466
Among the 9,000,000,000 10-digit numbers, 8,950,159,730 does not contain both 20 and 25.
So the answer is 49,840,270.
*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0


TonyBrown148

PkmnQ: 53,894,770
Gilbert: 3,780,000
TB148: 49,840,270
*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0

TonyBrown148

#1469
Quote from: gilbert_given_TBGmaking a colab notebook to solve it

well looks like we're gonna be in here for a while
There are only 9,000,000,000 10-digit numbers, not 90,000,000,000.
They are in the range [10^9,10^10).
*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0

Gilbert189

Quote from: TonyBrown148
Quote from: gilbert_given_TBGmaking a colab notebook to solve it

well looks like we're gonna be in here for a while
There are only 9,000,000,000 10-digit numbers, not 90,000,000,000.
that's what Byron's code gave me

TonyBrown148

Quote from: gilbert_given_TBGthat's what Byron's code gave me
byron is wrong. it's range(10**9,10**10)
*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0

PkmnQ

Quote from: PkmnQ56000000 - 2100000 + 10400 - (15600 + 10) + 0 - 20 = 53894770

I think that's the answer. There are 53894770 10-digit numbers with both 20 and 25 in them. I'm glad it wasn't asking about 23 and 32.
Let me show how I worked it out:

Counted 1 or more times:
2025######
20#25#####
20##25####
20###25###
20####25##
20#####25#
20######25
#2025#####
#20#25####
...
######2025
2520######
...

2*(7+6+5+4+3+2+1) = 56
56 * 10^6 = 56000000
Counted 2 or more times:
202025####
2020#25###
2020##25##
2020###25#
2020####25
...
20####2025
#202025###
...
####202025
...
202520####
...
252020####
...
252520####
...
252025####
...
202525####
...
6*((5+4+3+2+1)+(4+3+2+1)+(3+2+1)+(2+1)+1) = 210
210 * 10^4 = 2100000
Counted 3 or more times:
1. 20202025##
 2. 202020#25#
 3. 202020##25
 4. 2020#2025#
 5. 2020#20#25
 6. 2020##2025
 7. 20#202025#
 8. 20#2020#25
 9. 20#20#2025
10. 20##202025
11. #20202025#
12. #202020#25
13. #2020#2025
14. #20#202025
15. ##20202025
15 * 4 * 2 = 120
120 * 10^2 = 12000
Ok, looks like I made a mistake in the first post
Counted 4 or more times:
Case A.
(placement same as counted 3 times)
1. 20202525
2. 20252025
3. 20252520
4. 25202025
5. 25202520
6. 25252020
15 * 6 = 90
90 * 10^2 = 9000
Case B.
1. 2020202025
2. 2020202520
3. 2020252020
4. 2025202020
5. 2520202020
5 * 2 = 10
Counted 5 or more times:
None
Counted 6 or more times:
1. 2020202525
 2. 2020252025
 3. 2020252520
 4. 2025202025
 5. 2025202520
 6. 2025252020
 7. 2520202025
 8. 2520202520
 9. 2520252020
10. 2525202020
10 * 2 = 20

56000000 - 2100000 + 12000 - (9000 + 10) + 0 - 20 = 53902970
There, that's the correct answer
Quickly, I must save the Q's!
Project EAPIDTOTT2TTNO's current target: 4n topic
A cool kid quietly measures the distance in the banquet (5). :/ B)
On a journey to a new domain full of enrichment, With auras and curses for your entertainment, The concept of collectibles spent to unblock your path, Is stretched far to create an interesting aftermath. The ideas start simple at their most plain, Followed by golden power breaking constraints, Along with barriers to check you've cleared things out, Although double vision puts their power in doubt. Why raise up when you can instead replace, And why take just some when you can completely erase? Replacing with nothing may sound like obliteration, But there's a good reason for its differentiation. Special colors that melt, fortify, and wash, And blockages not even gold can squash, A loft rumored to be haunted by a certain curse, And a metal whose purity demonstrates its worth. You've just reached amounts less than none, One thing is clear: It has only just begun.
Tip: Use c͢ombining cha͊racters, because ye᷂s.
Quine list

Threads that I think should be played more: link chain Pre-posted Destruction
Scripts: The sky is the limit

Gilbert189

Quote from: TonyBrown148
Quote from: gilbert_given_TBGthat's what Byron's code gave me
byron is wrong. it's range(10**9,10**10)

fixed it

PkmnQ

#1474
Quote from: gilbert_given_TBGAssuming trailing zeros aren't allowed
I forgot to mention, the original question was about phone numbers, I just used 10 digit numbers to make it clearer. Trailing zeroes are allowed.
Quickly, I must save the Q's!
Project EAPIDTOTT2TTNO's current target: 4n topic
A cool kid quietly measures the distance in the banquet (5). :/ B)
On a journey to a new domain full of enrichment, With auras and curses for your entertainment, The concept of collectibles spent to unblock your path, Is stretched far to create an interesting aftermath. The ideas start simple at their most plain, Followed by golden power breaking constraints, Along with barriers to check you've cleared things out, Although double vision puts their power in doubt. Why raise up when you can instead replace, And why take just some when you can completely erase? Replacing with nothing may sound like obliteration, But there's a good reason for its differentiation. Special colors that melt, fortify, and wash, And blockages not even gold can squash, A loft rumored to be haunted by a certain curse, And a metal whose purity demonstrates its worth. You've just reached amounts less than none, One thing is clear: It has only just begun.
Tip: Use c͢ombining cha͊racters, because ye᷂s.
Quine list

Threads that I think should be played more: link chain Pre-posted Destruction
Scripts: The sky is the limit

TonyBrown148

#1475
The correct answer is 53920970
*See XKCD 1688.
Hi. My name is Tony Brown, or TB148 for short.
NEW GAME: https://tbgforums.com/forums/index.php?topic=6658.0