problem 178

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Clarification on problem 178

Post by Georg »

Is 90 a step number? I think yes. But my answer to problem 178 was wrong. So I'm not sure whether I have to skip numbers containing the consecutive digits 09 or 90 to correct my answer.
kotulek
Posts: 5
Joined: Sat Dec 29, 2007 6:13 pm
Location: Zeist, the Netherlands

Re: Clarification on problem 178

Post by kotulek »

According to the definition, a number is a step number if the difference between each pair of consecutive digits equals one. Since the difference between 0 and 9 is 9 and not 1, 90 is not a step number.
User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Clarification on problem 178

Post by Georg »

You're right. I got the correct answer when not counting numbers containing the consecutive digits 09 or 90.
relue
Posts: 10
Joined: Mon Feb 04, 2008 2:14 pm

Problem 178

Post by relue »

Does the problem include numbers start with 0 or not?
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Problem 178 clarification needed

Post by daniel.is.fischer »

No, leading zeros are only allowed if explicitly mentioned.
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
naadv
Posts: 6
Joined: Tue Oct 12, 2010 12:32 pm

Re: Problem 178

Post by naadv »

Hi,
Problem 178 (View Problem)
I'm stuck in this problem, and considering where my mistake is.
Meanwhile, can someone please verify me that the solution for the problem with the bound of 10^20 is 35899?

Thank you. :)
lg5293
Posts: 3
Joined: Mon Sep 27, 2010 9:49 pm

Re: Problem 178

Post by lg5293 »

I don't think that is correct. Your answer is too small, so you're probably missing some cases.
tpgettys
Posts: 4
Joined: Wed May 09, 2012 5:18 am

problem 178

Post by tpgettys »

I am wondering if a pandigital number may begin with 0.
For example, in determining the number of 10 digit pandigital numbers, what is the answer?

problem 178 - step numbers
Consider the number 45656.
It can be seen that each pair of consecutive digits of 45656 has a difference of one.
A number for which every pair of consecutive digits has a difference of one is called a step number.
A pandigital number contains every decimal digit from 0 to 9 at least once.
How many pandigital step numbers less than 1040 are there?
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: problem 178 - step numbers

Post by TripleM »

The only number that starts with a digit of 0 is 0. 0123456789 is not a number.
cska
Posts: 5
Joined: Thu Apr 19, 2012 5:40 pm

Re: problem 178

Post by cska »

Can anybody confirm that 40692 is correct for the 10^20 and 1509203434 for the 10^30 limits? Thanks.
MHealy
Posts: 40
Joined: Sat Nov 17, 2012 11:32 pm

Re: problem 178

Post by MHealy »

Your result for 10^30 is over 10 times too big :(

Good luck.
Image
cska
Posts: 5
Joined: Thu Apr 19, 2012 5:40 pm

Re: problem 178

Post by cska »

Managed to solve this problem.. but it was at the edge of my abilities. I never thought I would be ever using 5-dimensional arrays :?
User avatar
angzhiping
Posts: 32
Joined: Sat Aug 09, 2014 3:51 pm
Location: Jurong East, Singapore
Contact:

Re: problem 178

Post by angzhiping »

cska wrote:Managed to solve this problem.. but it was at the edge of my abilities. I never thought I would be ever using 5-dimensional arrays :?
You can most certainly find a way to use 3 dimensional arrays.
Image
170825_b3d528c2bf87aaeff2a0ff93382fba94
User avatar
youth4ever
Posts: 12
Joined: Sun Jan 08, 2017 8:34 pm
Contact:

Re: problem 178

Post by youth4ever »

The only 10-digit pandigital step number is : 9876543210

For the case of 11-digit I found the following three numbers :
98765432101
89876543210
10123456789

Can you tell me please which is the 4-th pandigital step number of 11-digit length ?
Thanks.
DJohn
Posts: 90
Joined: Sat Oct 11, 2008 12:24 pm

Re: problem 178

Post by DJohn »

youth4ever wrote: Tue Dec 01, 2020 5:52 pm The only 10-digit pandigital step number is : 9876543210

For the case of 11-digit I found the following three numbers :
98765432101
89876543210
10123456789

Can you tell me please which is the 4-th pandigital step number of 11-digit length ?
Thanks.
Why do you think there is a fourth?
From your question, I am guessing that you've interpreted the problem as being about the number of 40 digit pandigital step numbers. It isn't - it's about the number of pandigital step numbers less than 10^40. That's not the same thing.
Post Reply