Smullyanin ja Kiven ongelmia ChatGPT:lle

Keskustelin ChatGPT:n kanssa parin älyllisen ongelman tiimoilta. Opehommissa minulla oli tapana laittaa tuo Kiven Lukkarin Sepeteusongelma lukion matikan kokeisiin. Lukiolaisista noin ⅓ ei saanut tehtävää oikein. Smullyanin kuvaongelma taisi vielä vaikeampi oppilaille. Eipä tuo tekoälykään pärjännyt kovin hyvin. Yksi kolmesta taisi tehtävästä taisi mennä oikein, kun pikkaisen autoin.

Jätän lukijalle pohdittavaksi, missä kohtaa tekoäly tekee virheellisen päättelyn. Noita vastauksia lukiessa ainakin minulta meinasi äly loppua.

Alla keskustelumme. M olen minä ja C on ChatGPT 4-versio.

ongelma “what is the name of this book? -kirjasta

M: A man is looking at a portrait. Someone asked him, ”whose picture are you looking at?” He replied: ”Brothers and sisters I have none but this man’s father is my father’s son.” Whose picture was the man looking at?

C: The man was looking at his own picture.

M: How did you come to that conclusion?

C: The statement ”this man’s father is my father’s son” is a bit confusing at first, but it essentially means that the man is referring to his own son. Let’s break it down:

  • ”This man’s father”: Refers to the father of the person in the portrait.
  • ”My father’s son”: Refers to the man himself, since he is the son of his own father.

So, the statement can be rewritten as ”The father of the person in the portrait is the son of me (the man in front of the portrait)”. This means that the person in the portrait is actually the son of the man himself, which makes the portrait a picture of the man. Therefore, the man was looking at his own picture.

M: Maybe I clarify the problem a little. A man called Mikko is looking at a portrait of a man. Someone asked him, ”whose picture are you looking at?” He replied: ”Brothers and sisters I have none but this man’s father is my father’s son.” Whose picture was Mikko looking at?

C: Thank you for clarifying the problem. In this case, the man Mikko is looking at a portrait of his own son.

Let’s break down the statement ”this man’s father is my father’s son”.

  • ”This man’s father” refers to the father of the person in the portrait.
  • ”My father’s son” refers to Mikko himself, since he is the son of his own father.

So, the statement can be rewritten as ”The father of the person in the portrait is the son of Mikko”. This means that the person in the portrait is actually Mikko’s son. Therefore, Mikko is looking at a portrait of his own son.

M: Why did the change in text change your answer?

C: I apologize for any confusion. The original problem did not include the name of the man looking at the portrait, so I made the assumption that the person referred to in the statement ”this man’s father is my father’s son” was the man himself.

However, in the clarified problem, the man looking at the portrait is named Mikko. Therefore, the statement ”this man’s father is my father’s son” refers to Mikko himself, not the person in the portrait.

I hope this clears up any confusion and provides a more accurate answer to the problem.


M: What if Mikko said: ”Brothers and sisters and I have none, but this man’s son is my fathers son.” Now whose picture is Mikko looking at?

C: If Mikko said, ”Brothers and sisters I have none, but this man’s son is my father’s son,” then he is looking at a portrait of his own nephew.

Let’s break down the statement:

  • ”This man’s son” refers to the son of the person in the portrait.
  • ”My father’s son” refers to Mikko himself, since he is the son of his own father.

So, the statement can be rewritten as ”The son of the person in the portrait is the son of Mikko’s father”. This means that the person in the portrait is actually Mikko’s brother, and the son of the person in the portrait is Mikko’s nephew. Therefore, Mikko is looking at a portrait of his own nephew.

M: But man refers to the man in the picture.

C: I apologize for the confusion. If the statement ”this man’s son is my father’s son” refers to the man in the portrait, then Mikko is looking at a portrait of his own brother.

Let’s break down the statement:

  • ”This man’s son” refers to the son of the person in the portrait, who is Mikko’s nephew.
  • ”My father’s son” refers to Mikko himself, since he is the son of his own father.

So, the statement can be rewritten as ”The son of the person in the portrait is the brother of Mikko”. This means that the person in the portrait is actually Mikko’s brother, and the son of the person in the portrait is Mikko’s nephew. Therefore, Mikko is looking at a portrait of his own brother.

M: But Mikko has no brothers.

C: I apologize for any confusion. If Mikko has no brothers, then the statement ”this man’s son is my father’s son” is impossible to satisfy.

If Mikko has no siblings, then he cannot have a nephew or a brother. The statement ”this man’s son is my father’s son” would require that the man in the portrait is related to Mikko in some way, but based on the given information, we cannot determine who the man in the portrait is.

Therefore, without more information, we cannot determine whose portrait Mikko is looking at.

M: Do you know what book this problem is from?

C: This problem is a classic puzzle that has been around for many years and has been modified over time. It is often used as an example of a logic puzzle or lateral thinking problem. The origin of the puzzle is uncertain, but it has been widely circulated in various forms, including online and in puzzle books.

M: You should think again the 2nd problem.

C: I apologize for the error in my previous response. If Mikko said, ”Brothers and sisters I have none, but this man’s son is my father’s son,” then the person in the portrait is actually Mikko himself.

Let’s break down the statement:

  • ”This man’s son” refers to Mikko himself, since he is the son of the person in the portrait.
  • ”My father’s son” also refers to Mikko himself, since he is the son of his own father.

So, the statement can be rewritten as ”I am the son of the person in the portrait”. This means that the person in the portrait is actually Mikko himself. Therefore, Mikko is looking at a portrait of himself.

I apologize for any confusion caused by my previous response, and I hope this clears up the problem.

M: You must read the book ”What is the name of this book?” by Raymond Smullyan. Your answer to 2nd problem is wrong.

C: Thank you for bringing this to my attention. Upon further research, I have found that you are correct that the answer to the second problem from Raymond Smullyan’s book ”What Is the Name of This Book?” is different from the answer I provided.

In Smullyan’s version of the problem, the statement is ”Brothers and sisters, have I none, but this man’s father is my father’s son. Who is the man in the portrait?” In this version, the man in the portrait is actually the son of Mikko, making Mikko his father.

I apologize for any confusion my previous responses may have caused and for any errors in my reasoning. Thank you for bringing this to my attention and for providing the correct source and answer.

If we forget about the name Mikko and only consider the statement ”Brothers and sisters and I have none, but this man’s son is my father’s son,” then the man is looking at a portrait of his own son.

Let’s break down the statement:

  • ”This man’s son” refers to the son of the person in the portrait.
  • ”My father’s son” refers to the man himself.

So, the statement can be rewritten as ”The son of the person in the portrait is the man’s own son.” Therefore, the man is looking at a portrait of his own son.

M: OK, you are trying, but not hard enough. Bye.

Seitsemän veljeksen Lukkarin ongelma Juhanille

Tässä vaiheessa vaihdoin suomen kielelle. Päätinpä kysyä Lukkarin ongelmaa Seitsemästä veljeksestä.

M: Aleksis Kiven kirjassa Seitsemän veljestä Lukkari kysyy: ”Mikä oli Sepeteuksen poikien isän nimi”? Miten sinä päättelet vastauksen?

C: Valitettavasti en voi päätellä vastausta tähän kysymykseen, sillä minun tietoni perustuvat kirjoitettuun tekstiin, jota olen käsitellyt koulutusdatanani. Aleksis Kiven kirjan Seitsemän veljestä sisältö on minulle tuttu, mutta en muista, mainitaanko siinä Sepeteuksen poikien isän nimeä. Voitko kertoa minulle enemmän asiayhteydestä tai kohdasta kirjassa, jossa tämä kysymys esitetään?

M: Lukkarin kysymys on knoppikysymys. Hän haluaa pelleillä Juhanin kanssa. Niinpä sinun ei tarvitse tietää mitään koko kirjasta. Eli vielä kerran. Mikä oli Sepeteus nimisen miehen poikien isän nimi?

C: Kiitos selvennyksestäsi. Koska kyseessä on fiktiivinen nimi, minulla ei ole tietoa Sepeteuksen poikien isän nimestä. Aleksis Kiven teoksen Seitsemän veljestä kuvitteellinen tarina, joten Sepeteus ja hänen poikansa ovat myös kuvitteellisia hahmoja eivätkä heidän nimet liity todellisiin henkilöihin. Lukkarin kysymys voi siis olla vain mielikuvituksellinen ja perustua vain fiktiiviseen tarinaan.

M: Heh. Palataan asiaan myöhemmin.


lähteet

ChatGPT 4
https://openai.com/product/gpt-4

Raymond Smullyan. What is the name of this book?. Penguin. 1985.

Aleksis Kivi. Seitsemän veljestä. WSOY. 1950.

Advertisement

Istumapaikkanumeroiden arpominen Google Sheetsillä

Kirjoitin pari päivää sitten artikkelin ”Istumapaikkanumeroiden arpominen Excelillä”. Päätin sitten luoda samankaltaisen sovelluksen myös Google Sheetsillä. Varsinkin kun Excel-versioni toimii vain uusilla 365 Exceleillä.

Alun perin aloitin sovelluksen teon Sheetsillä, mutta en saanut SORTN()-funktiota toimimaan haluamallani tavalla. Ongelma ratkesi helpommin Excelillä ja sen SORTBY() ja SEQUENCE() -funktioilla.  Excel-versiossa koko homma onnistui yhdellä pitkähköllä komennolla, Google Sheetsissä pitää (ainakin tässä minun ratkaisussani) luoda pari ylimääräistä saraketta, jotka voi lopuksi piilottaa.

Sovellus toimii seuraavasti.

Laitetaan oppilaiden nimet soluun C2 ja siitä alaspäin.  Sarakkeelle A luodaan satunnaislukuja saman verran kuin on oppilaiden nimiäkin solun A2 kaavalla
=RANDARRAY(COUNTA(C2:C201))

B-sarakkeelle luodaan lukujono 1, 2, …, nimien lukumäärä, solun B2 kaavalla
=SEQUENCE(COUNTA(C2:C201))

Kun soluun D2 kirjoitetaan kaava
=SORTN(A2:B200;COUNTA(C2:C200);A2:A200)
ilmestyy sarakkeelle D sarakkeen A satunnaisluvut suuruusjärjestyksessä ja niiden avulla luotu satunnainen järjestysluku sarakkeelle E.

Kun sarakkeet A, B ja D piilotetaan, on sovellus valmis.

Valmis sovellus löytyy Google Drivestäni oheisen linkin takaa https://docs.google.com/spreadsheets/d/1negVr7JcoWAXl7Dri3HHpVOLy6AFxbF_UM-MLbyXD3M/edit?usp=sharing

Istumapaikkanumeroiden arpominen Excelillä

[edit. 14.3.23 lisäsin loppuun kommentin toimimattomuudesta vanhoissa Exceleissä]

Näihin aikoihin varmaankin aika monessa koulussa luodaan istumajärjestyslistoja ylioppilaskirjoituksia varten. Toisaalta opettajat saattavat tarvita opetuksessaan menetelmän, jolla aakkostettuun oppilaslistaan liitetään kullekin oppilaalle satunnainen järjestysluku. Niinpä tein sellaisen Excelillä.

Kauan sitten, kun vielä toimin opehommissa käytin tämän tyyppisen ongelman ratkaisuun GeoGebraa ja sen listakomentoja. Tai sitten sekoitin oppilaita taulukkolaskennan satunnaisluvuilla ja järjestä-valikkokomentojen avulla. Tämä versio perustuu Excelin SORTBY ja SEQUENCE -funktioihin. Aloitin tämän sovelluksen tekemisen Google Sheetsillä, mutta en saanut sitä toimimaan halutulla tavalla. Excelistä löysin sopivat funktiot ongelman ratkaisuun. Palannen joskus ongelman ratkaisuun Google Sheetsillä.

Taulukkoni ainoa kaava on solussa B2. Kaava on =SORTBY(SEQUENCE(COUNTA(A2:A200));RANDARRAY(COUNTA(A2:A200)))
Suomeksi
=LAJITTELE.ARVOJEN.PERUSTEELLA(JONO(LASKE.A(A2:A200));SATUNN.MATRIISI(LASKE.A(A2:A200)))

Tutkitaan miten kaavassa käytetyt funktiot toimivat.

SEQUENCE(n) funktio tuottaa lukujonon 1, 2, …, n alaspäin. Kun soluun A1 kirjoittaa SEQUENCE(n), niin alueelle A1:A10 ilmestyy lukujono 1, 2, …, 10. 

SEQUENCE() on suomeksi JONO() Excelissä.

RANDARRAY(n) tuottaa n-kappaletta satunnaislukuja SEQUENCE-funktion tapaan. Kun soluun B1 kirjoitetaan =RANDARRAY(10), niin taulukkoon ilmestyy 10 satunnaislukua.

RANDARRAY on suomeksi SATUNN.MATRIISI.

SORTBY(alue1; alue2) järjestää solualueen alue1 solualueen alue2 mukaiseen järjestykseen. 

=SORTBY(A1:A10;B1:B10)

SORTBY() on suomeksi LAJITTELE.ARVOJEN.PERUSTEELLA(), aika selkeä käännös :o)

COUNTA(alue) laskee solualueessa alue olevien ei tyhjien solujen lukumäärän. Kuvassa solussa D11 on kaava =COUNTA(D1:D10). Se tuottaa alueella olevien Excelin olioiden lukumäärän.

COUNTA() on suomeksi LASKE.A().

Näillä tiedoilla lopullisen kaavan tuottaminen onkin itsestäänselvää. Luodaan tyhjään taulukkoon 1 riville otsikot nimi ja paikka. Kirjoitetaan (tai sijoitetaan)  nimi-otsikon alle nimiä, tässä versiossa niitä voi kirjoittaa sinne noin 200 kpl. Kun soluun B2 kirjoitetaan kaava =SORTBY(SEQUENCE(COUNTA(A2:A200));RANDARRAY(COUNTA(A2:A200)))
niin sovellus on valmis.

Suomeksi kaava on
=LAJITTELE.ARVOJEN.PERUSTEELLA(JONO(LASKE.A(A2:A200));SATUNN.MATRIISI(LASKE.A(A2:A200)))

Pitänee huomata, että nimissä ei saa olla tyhjiä soluja keskellä. Tällaisessa tilanteessa kaikki oppilaat eivät saa omaa arvoa.

Tämä sovellus toimii vain uusimmissa Excel-versioissa. Käsittääkseni SEQUENCE()-funktio toimii vain Excel for Microsoft 365 ja Excel 2021 -versioissa.

Excel-tiedosto, lataa täältä.
https://mikonfysiikka.files.wordpress.com/2023/03/yo-istumapaikka.xlsx