Problem 124

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
dawghaus4
Posts: 56
Joined: Fri Nov 29, 2013 2:22 am

Problem 124

Post by dawghaus4 »

Let me start with a big thank you to all who have contributed to Project Euler. I am 70 years old and started programming in C++ last November. The Project Euler problems have provided a strong stimulus and motivation and I have learned much that I would not have, otherwise.

Now my first issue. Problem 124 provides this definition.

The radical of n, rad(n), is the product of distinct prime factors of n.

In the problem's example, rad(1) is given to have a value of 1. How does that come from the definition?

It would seem that a better definition would be: rad(1) = 1. If n is prime, rad(n) = n. For all other natural numbers n, rad(n) is the product of the distinct prime factors of n.

(Note the use of the. Without it, one could interpret rad(180) to have several different values, 6, 10, 15, and/or 30, all of which are products of distinct prime factors of 180. One might also include 2, 3, and 5, since the current wording doesn't require any multiplication to form a product.)

I'm sure the current wording has cause no problems, but doesn't measure up to the high caliber that I have become accustomed to seeing.
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 124

Post by TripleM »

In mathematics a product of an empty set is defined to be equal to 1: https://en.wikipedia.org/wiki/Empty_product

For someone unaware of this, rad(1) is specifically provided in the table so there shouldn't be any room for misunderstanding.

I agree an extra 'the' would probably be marginally better English, but again you would be hard pressed to say the current version is incorrect or able to be misunderstood given the numerous examples.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 124

Post by hk »

the added.
The definition of rad(1) can be read from the table.
Image
War ruins the life and health of untold numbers of innocent children.
Post Reply