Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You will remember something that you should not have forgotten.


comp / comp.lang.lisp / Re: New Scientist Puzzle

SubjectAuthor
* New Scientist PuzzleB. Pym
`* Re: New Scientist PuzzleHenHanna
 `- Re: New Scientist Puzzlesteve g

1
Subject: New Scientist Puzzle
From: B. Pym
Newsgroups: comp.lang.lisp
Organization: A noiseless patient Spider
Date: Tue, 11 Jun 2024 08:51 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (B. Pym)
Newsgroups: comp.lang.lisp
Subject: New Scientist Puzzle
Date: Tue, 11 Jun 2024 08:51:08 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <v4935o$vj38$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Tue, 11 Jun 2024 10:51:08 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d2ae20237df250ddceb677ab00583f50";
logging-data="1035368"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189/aGiNtdRpnZJwaKuA1e6"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:phZ+CupMI1PFRt8Z1mXgDU0yeuw=
View all headers

VIER and NEUN represent 4-digit squares, each letter denoting a
distinct digit. You are asked to find the value of each, given the
further requirement that each uniquely determines the other.

The "further requirement" means that of the numerous pairs of
answers, choose the one in which each number only appears once
in all of the pairs.

Gauche Scheme

(use srfi-13) ;; string-map
(use srfi-42) ;; list-ec
(define squares4d
(map (lambda (n) (number->string (square n)))
(lrange 32 100)))

(define alphabet (map integer->char (lrange 65 91)))

(define (->pattern str)
(let ((table
(map cons
(delete-duplicates (string->list str))
alphabet)))
(string-map (cut assoc-ref table <>) str)))

(define possibles
(let ((pat (->pattern "NEUNVIER")))
(list-ec
(:list n squares4d)
(:list v squares4d)
(if (equal? pat (->pattern (string-append n v))))
(list n v))))

(define (count* f xs)
(count (lambda(ys) (equal? (f xs) (f ys))) possibles))

(find
(lambda(nv) (= 1 (count* car nv) (count* cadr nv)))
possibles)

===>
("9409" "6241")

Subject: Re: New Scientist Puzzle
From: HenHanna
Newsgroups: comp.lang.lisp, alt.english.usage
Organization: A noiseless patient Spider
Date: Tue, 11 Jun 2024 21:37 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.lisp,alt.english.usage
Subject: Re: New Scientist Puzzle
Date: Tue, 11 Jun 2024 14:37:42 -0700
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <v4ag37$182gf$2@dont-email.me>
References: <v4935o$vj38$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Jun 2024 23:37:43 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="73f10df3be90380e2b8c4cc314e64c3c";
logging-data="1313295"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/I7fUFNKn4yxNQV3JxwQXVtUpLUnRJ8N8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:uPQJ4dWeLvfHo1OkDT4b0QpWh9c=
Content-Language: en-US
In-Reply-To: <v4935o$vj38$1@dont-email.me>
View all headers

On 6/11/2024 1:51 AM, B. Pym wrote:
> VIER and NEUN represent 4-digit squares, each letter denoting a
> distinct digit. You are asked to find the value of each, given the
> further requirement that each uniquely determines the other.
>
> The "further requirement" means that of the numerous pairs of
> answers, choose the one in which each number only appears once
> in all of the pairs.
>

-------- Is this easy to understand?
(What the problem is asking?)

% Problem: VIER and NEUN are 4-digit squares; determine distinct V, I,
% E, R, N, and U, such that there is a unique solution (VIER,NEUN) for
% some particular E.

-------- OK... that makes more sense.

What does Sigmund Freud say comes between fear and sex?

Subject: Re: New Scientist Puzzle
From: steve g
Newsgroups: comp.lang.lisp
Date: Sat, 10 Aug 2024 18:17 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-2.nntp.ord.giganews.com!nntp.giganews.com!local-2.nntp.ord.giganews.com!Xl.tags.giganews.com!local-4.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 10 Aug 2024 18:17:01 +0000
From: sgonedes1977@gmail.com (steve g)
Newsgroups: comp.lang.lisp
Subject: Re: New Scientist Puzzle
References: <v4935o$vj38$1@dont-email.me> <v4ag37$182gf$2@dont-email.me>
User-Agent: Gnus/5.13 (Gnus v5.13)
Date: Sat, 10 Aug 2024 14:17:01 -0400
Message-ID: <87v808dyzm.fsf@gmail.com>
Cancel-Lock: sha1:9zniz6wgD3BRDKvcEwOLmdcFTQw=
MIME-Version: 1.0
Content-Type: text/plain
Lines: 27
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-z1SFClOohi55onUCoMsqBptQGKqBD9Y8k9OI3zQ8lRb3mSxdbLl8aqOaqU7zOMZzQrs20k2j2dMhQGU!bmEu6mA+sQ8X+FhBzN7lwnBNRN7CMur2HLm1u6k2Pp/WXlA=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

HenHanna <HenHanna@devnull.tb> writes:

> On 6/11/2024 1:51 AM, B. Pym wrote:
< > VIER and NEUN represent 4-digit squares, each letter denoting a
< > distinct digit. You are asked to find the value of each, given the
< > further requirement that each uniquely determines the other.
< > The "further requirement" means that of the numerous pairs of
< > answers, choose the one in which each number only appears once
< > in all of the pairs.
< >
>
>
> -------- Is this easy to understand?
> (What the problem is asking?)
>
>
> % Problem: VIER and NEUN are 4-digit squares; determine distinct V, I,
> % E, R, N, and U, such that there is a unique solution (VIER,NEUN) for
> % some particular E.
>
> -------- OK... that makes more sense.
>
>
>
> What does Sigmund Freud say comes between fear and sex?

union and seperation.

1

rocksolid light 0.9.8
clearnet tor