#Subpalindromes question

208 messages · Page 1 of 1 (latest)

pale aurora
#

This is a question a friend showed me:
A palindrome is any sequence of 2 or more letters that reads the same

forwards as it does backwards. For example, MM, EVE, NOON, and

ABABA are all palindromes.

A subpalindrome of a palindrome is any palindrome it contains. Notice

that this includes the palindrome itself.

For example, ABBBA has four subpalindromes, as underlined below:

ABBBA

ABBBA

ABBBA

ABBBA

Note that we count the subpalindrome BB twice since it appears in two

different positions.

a Show how two letters can be added to ABBBA to create a seven-letter

palindrome that has exactly five subpalindromes.

b Find a palindrome of length 30 that has exactly 30 subpalindromes,

or explain why no such palindrome exists.

c Find a palindrome of smallest possible length that has at least 30 sub-

palindromes.

d Find a palindrome of smallest possible length that has exactly 30 sub-

palindromes.

What I got so far:

So far, I can't even get A through trial and error method. For example, I tried AABBBAA which has too many then I have CABBAC which I think reduces it. I need a methodical method to continue the question - also it will be needed in further questions.

inner ridgeBOT
#
  1. Do not ping the Moderators, unless someone is breaking the rules.
  2. Do not ping the Helper Moderators, unless there is a conflict between helpers.
  3. Do not ping other members randomly for help.
  4. Ask your question and show the work you've done so far. If you've posted a screenshot of a question, specify which part you need help with.
  5. Wait patiently for a helper to come along.
  6. If the Helper has answered your question, remember to thank them with the Mathematics Ranks bot and close the thread with:

+close
Feel free to nominate the person for helper of the week in #helper-nominations
If you're happy with the help you got here, and the server overall, you can contribute financially as well:

pale aurora
#

It should work except the bigger questions i dont know how to do?

flint jay
pale aurora
#

I think it should be 0? if less than 26 (not really sure)

#

Also I would like anyone to review my approach to the first part

flint jay
pale aurora
#

yes the answer to the simpler question

flint jay
pale aurora
#

AB?

flint jay
pale aurora
#

So AA?

flint jay
#

That has one subpalindrome; itself.

pale aurora
#

I dont really think it is possible

#

Anyways is this correct to part (a) CABBBAC

flint jay
#

Well, yes, but why?

pale aurora
#

because a subpalindrome has to have at least 2 right?

flint jay
#

...what?

pale aurora
#

i mean it has to have at least 2 letters right?

flint jay
#

Okay, and?

pale aurora
#

Does this mean that CABBBAC is correct in (a)?

flint jay
#

Okay. ABBBA has four subpalindromes, right?

pale aurora
#

Yes, itself and the combinations of B

flint jay
#

You want to add two characters to give it five.

#

So you want to add two characters to add one subpalindrome.

#

So prove that adding the C's on the end adds one subpalindrome.

#

It trivially adds at least one.

#

Which you would know if you actually tried to answer the question I asked you.

pale aurora
#

wdym

flint jay
#

How. Many. Subpalindromes. Does. A. Palindrome. Of. Length. N. Have. At. Minimum?

pale aurora
#

that would be 1

flint jay
#

Okay, show me a palindrome of length 4 with exactly 1 subpalindrome.

pale aurora
#

I dont actually think it is possible

#

Ifyou try it has to be something like ABBA which has two subpalindromes

flint jay
#

Right. So what is the minimum number of subpalindromes that a palindrome of n characters can have?

pale aurora
#

I know that ABA is a palindrome which should fulfil n=3 where it is still has 1 palindrome which is the minimum

flint jay
#

I'm. Not. Asking. What. The. Minimum. Possible. Number. Of. Subpalindromes. Is. For. A. Palindrome. Of. Any. Length. I'm. Asking. What. The. Minimum. Number. Is. For. A. Palindrome. Of. Length. N.

#

For. Arbitrary. N.

pale aurora
#

Ah. that would be 2?

flint jay
#

Okay, show me a two-character palindrome with two subpalindromes.

pale aurora
#

That isnt possible since you cant further divide it

flint jay
#

So then the answer isn't 2.

#

Stop guessing, start thinking.

pale aurora
#

so you're asking the minimum to create subpalindromes?

#

That would be 4

flint jay
#

I don't even know what the hell that means.

#

No.

#

IF. YOU. HAVE. A PALINDROME. OF N CHARACTERS.

#

HOW MANY SUBPALINDROMES MUST IT HAVE.

pale aurora
#

At least 1

flint jay
#

WHAT IS THE NUMBER OF SUBPALINDROMES THAT IT CANNOT HAVE LESS THAN.

#

AND THAT IT CAN HAVE EXACTLY AS MANY AS.

flint jay
pale aurora
#

thats not possible

flint jay
#

SO THEN THE ANSWER ISN'T 1.

pale aurora
#

2?

flint jay
#

SHOW ME A TWO-CHARACTER PALINDROME WITH TWO SUBPALINDROMES.

inland sigil
#

techie. Have a chill pill. 🧊 💊

flint jay
inland sigil
flint jay
inland sigil
#

just a little patience,
or not you getting angry/annoyed is funny

inland sigil
# pale aurora 2?

just so techie doesn't die,
A two letter palindrome can ONLY have 1 subpalidrome, which is itself, because you can only arrange two of the same letters in one way, and that happens to be a palidrome.

pale aurora
#

yeh

flint jay
# pale aurora 2?

Do you even have any paper? How is your memory for wrong answers this bad?

pale aurora
#

I can write down everything you say if you want

flint jay
#

That's what's pissing me off the most here.

ashen olive
#

Then take a break.

pale aurora
#

A 2 letter has one subpalindrome, 4 letter has to have at least 2

flint jay
pale aurora
#

so it isnt constant at all for any n numbers. is there a pattern?

flint jay
#

See, now you're thinking.

#

And there must be a pattern, right? After all, a palindrome is a very well-defined structure.

pale aurora
#

so is the approach to find the pattern and extrapolate?

flint jay
#

...yes.

#

Which is to say, the approach is to do math, because that's what math is.

#

Finding patterns in logical structures.

#

Here's a simple question about the logical structure of a palindrome; how is one constructed?

#

@pale aurora That is to say, if I want to make a palindrome, how would I do it?

inland sigil
#

is help still needed?

flint jay
#

Help is still here.

inland sigil
#

oh

#

hi techie

#

i'm a big fan of your's

flint jay
#

It's been literally eleven minutes.

#

And it's OP's turn to speak.

inland sigil
#

ahem. @pale aurora

pale aurora
#

So far, ive been trying to find a pattern

inland sigil
#

SPEAK OF THE DEVIL

#

JUST IN TIME

tough blaze
#

5 mins late

inland sigil
#

remember adding a new letter to the start and end of abbba only raised the amount of sub palindromes by 1

#

perhaps there is a pattern there you could state

#

is this guy even still here?

flint jay
tough blaze
#

I think he’s asking if the guy is still active in this thread

#

Or if he just gave up and left or smth

tough blaze
tough blaze
#

@pale aurora, do you still need help?

pale aurora
#

Im back now
So far I have CABBAC as the answer to (a) - check if this is the answer
However, I have somehow found a pattern as mentioned before but I dunno how it helps

tough blaze
#

CABBBAC is correct, did you mistype?

#

Did you get b?

#

The 2nd sub question

pale aurora
#

Yeah i meant CABBBAC
I dont kno how to do (b)

tough blaze
#

Ok, at least how many sub palindromes should a palindrome of length 30 have?

pale aurora
#

Perhaps 15?

tough blaze
#

If you don’t get it, here’s a hint: there has to be atleast one axis of symmetry in a palindrome (at the centre).

tough blaze
#

Now if I have another axis of symmetry, forming a palindrome at position x, there must be another one at…?

pale aurora
#

x/2

#

but how does that really relate to proving it cannot be 30.

tough blaze
tough blaze
#

It’s 31-x

#

Does that make sense? If I have another axis of symmetry at some position x, there has to be a corresponding one at 31-x

#

Because the entire thing is symmetrical along the centre

pale aurora
#

So how would that fit in the question?

tough blaze
#

Be patient

#

So now, if there is another sub palindrome, besides the aforementioned 15, there would be a corresponding copy of it, right?

#

What does that tell you about the number of sub palindromes besides the aforementioned 15?

pale aurora
#

That it will be embedded?

tough blaze
#

No, the NUMBER

#

Odd or even?

pale aurora
#

even

tough blaze
#

And 15 + an even number = ?

pale aurora
#

Odd

tough blaze
#

So, the total number of sub palindromes is always?

pale aurora
#

odd?

#

also for part c) it would just be a string of the same letter
i found a pattern earlier
AA -> 1 (number of subpalindromes)
AAA -> 3
AAAA -> 6
AAAAA -> 10
AAAAAA -> 15
and so on
so the smallest length with at least 30 would be 8 i believe

is this correct?

tough blaze
#

No, but we’ll come back to that

#

Did you understand b?

pale aurora
#

no

tough blaze
#

What is 30?

#

Even or odd?

pale aurora
#

so does that automatically disprove that it is 30

tough blaze
#

Yes

pale aurora
#

so the total amount applies to all palindromes?

tough blaze
#

Yes it is always 15 + some even number

#

Some even number can also be 0

#

So it’s always odd

#

So never 30

pale aurora
#

Why 15?

tough blaze
#

Those are the ones formed by the central axis of symmetry

pale aurora
#

so is it not always 15 or not?

tough blaze
#

The number of sub palindromes is always 15 + some even number, the even number CAN be 0, but needn’t be

pale aurora
#

why tho?

#

15 is very specific

tough blaze
#

You said it yourself. It’s the least number of sub palindromes a palindrome of length 30 HAS to have

#

Or it wouldn’t be a palindrome

pale aurora
#

so it applies to the 30

tough blaze
#

Yes

pale aurora
#

so where does the addition of the even number come from?

tough blaze
#

There CAN be additional sub palindromes, since 15 is the LEAST.

pale aurora
#

why is it always even

tough blaze
pale aurora
#

that doesn't say why you always add an even num

tough blaze
#

2n is always even, where n is a whole number

#

And there are always 2 copies of any other sub palindrome (other than the 15 that is)

pale aurora
#

so you're saying if there's a palindrome on one side, there is another one on the other?

tough blaze
#

Yes

#

The same one too

#

Because by definition of a palindrome, the entire thing is symmetrical along the centre

pale aurora
#

so i would i go writing my solution in an acceptable way

tough blaze
#

The centre is between the 15th and 16th characters.
So, the 15th character = 16th character and 14th = 17th and so on
So, there are 15 sub palindromes along this axis. (Of length 2,4,6,…,30)
Any other axis of symmetry forming a palindrome at say,x, would have a copy at 31-x.
So, all the other axes contribute an even number of sub palindromes.
So total number of sub palindromes = 15+some even number which is an odd number.

#

Since 30 is an even number, the total number of sub palindromes can’t be 30

pale aurora
#

so i write it like that?

tough blaze
#

I mean, yeah, but do you understand?

pale aurora
#

ok yes

tough blaze
#

My answer doesn’t have the proper notation, since I don’t know what is expected of you, so you have to write it in your own words

pale aurora
#

so this is correct for (b) and CABBBAC is correct for (a)
could you check my solution for (c)
(lemme get it up)

tough blaze
#

It’s wrong, 8 is wrong

pale aurora
#

ok for part c) it would just be a string of the same letter
i found a pattern earlier
AA -> 1 (number of subpalindromes)
AAA -> 3
AAAA -> 6
AAAAA -> 10
AAAAAA -> 15
and so on
so the smallest length with at least 30 would be 9 i believe

#

can you recheck the solution?

tough blaze
#

Yeah, 9

#

What is it exactly?

#

How many sub palindromes?

pale aurora
#

Its a bit like triangle

#

Because you start with the whole then it adds on

tough blaze
#

Ok, but how many sub palindromes does a palindrome of length 9 have?

pale aurora
#

it is basically a triangle

tough blaze
#

Huh? I asked for the number

pale aurora
#

it should be the 8th triangular number which is 36
the one before that is 28

tough blaze
#

Yeah

pale aurora
#

so these are right answers for a-c?
a) CABBBAC
b) no such palindrome exists because a palindrome of length 30 must contain an odd number of subpalindromes (30/2 = 15 then add an even)
c) AAAAAAAAA (9)

#

Please answer if so, please answer yes or no. For (d), i dont really get how to do it?

tough blaze
#

Correct

pale aurora
#

For D can you check this solution and suggest how i can back up this answer without myself just guessing it CBAAAAAAAABC

tough blaze
#

That’s actually correct

pale aurora
#

I randomly guessed it. can you help me write my solution so it is methodical and not guessing?

tough blaze
#

AAAAAAAA has 28 sub palindromes

#

As you know

pale aurora
#

so we just slap two more on right?

tough blaze
#

So now you just wrap it in CB and BC to get two more sub palindromes

pale aurora
#

Nice

tough blaze
#

So, 12

#

Is the answer

#

It can also be something like ABCCCCCCCCAB

pale aurora
#

ok i'll review what you said. i think i should understand but i still need to collate this into my own words

#

anyways the letters dont matter too much!

#

I'll close this once I'm finished