Μετάβαση στο περιεχόμενο

Τεχνητή Νοημοσύνη — Ιούνιος 2024

2.jpg

Ερώτηση 7
Αν οι \(h_1\) και \(h_2\) είναι παραδεκτές ευρετικές συναρτήσεις, τότε, για \(k > 0\) και \(m > 0\), και η \(k \cdot h_1 + m \cdot h_2\) θα είναι παραδεκτή, όταν \(k + m \le 1\).
- [ ] α. Ποτέ δεν ισχύει.
- [ ] β. Άλλοτε ισχύει και άλλοτε δεν ισχύει.
- [ ] γ. Πάντοτε ισχύει.
- [ ] δ. Πάντοτε ισχύει, ακόμα και αν \(k + m > 1\).

Ερώτηση 8
Όταν η μέθοδος αναζήτησης \(A^*\) εφαρμοσθεί σε πρόβλημα με μοναδιαία κόστη ακμών και τιμή της ευρετικής συνάρτησης \(h = 0\) για κάθε κόμβο, ...
- [ ] α. ... ενδέχεται να παγιδευτεί σε κύκλο.
- [ ] β. ... εκφυλίζεται στην αναζήτηση σε πλάτος.
- [ ] γ. ... εκφυλίζεται στην άπληστη αναζήτηση.
- [ ] δ. ... ενδέχεται να επιστρέψει μη βέλτιστη λύση.

Ερώτηση 9
Ποιο/ποια από τα παρακάτω είναι αληθή για την άπληστη αναζήτηση;
- [ ] α. Βρίσκει πάντοτε βέλτιστη λύση αν η ευρετική συνάρτηση που χρησιμοποιεί είναι παραδεκτή.
- [ ] β. Αναπτύσσει πάντοτε λιγότερους κόμβους από την \(A^*\), για την ίδια ευρετική συνάρτηση.
- [ ] γ. Είναι ταχύτερη όταν τα κόστη των ακμών είναι μοναδιαία.
- [ ] δ. Δεν εγγυάται την εύρεση βέλτιστης λύσης.

Ερώτηση 10
Κατά την εφαρμογή μίας μεθόδου αναζήτησης, η λίστα των κλειστών καταστάσεων χρησιμεύει κυρίως...
- [ ] α. ... στην αποφυγή κύκλων.
- [ ] β. ... στην εύρεση της βέλτιστης λύσης.
- [ ] γ. ... στην αύξηση της ταχύτητας της μεθόδου.
- [ ] δ. ... στη μείωση της απαιτούμενης μνήμης.

Ερώτηση 11
Πώς μπορεί ο αλγόριθμος \(A^*\) να εφαρμοστεί στο πρόβλημα του πλανόδιου πωλητή (TSP);
- [ ] α. ...θεωρώντας το tsp ως πρόβλημα αναζήτησης για την εύρεση της συντομότερης διαδρομής μεταξύ δύο πόλεων
- [ ] β. ...θεωρώντας το tsp ως πρόβλημα αναζήτησης όπου κάθε κατάσταση είναι μια λίστα με όλες τις πόλεις.
- [ ] γ. ...δεν μπορεί να εφαρμοστεί γιατί δεν υπάρχει παραδεκτή ευρετική.
- [ ] δ. ...θεωρώντας το tsp ως πρόβλημα αναζήτησης, όπου η συνάρτηση μετάβασης προσθέτει μια νέα πόλη στη διαδρομή.

Ερώτηση 12
Αν στην προσομοιωμένη ανόπτηση η θερμοκρασία \(T \to \infty\) ο αλγόριθμος συμπεριφέρεται σαν:
- [ ] α. κατάβαση κλίσης με επιλογή του καλύτερου
- [ ] β. κατάβαση κλίσης με τυχαία επιλογή (στοχαστική)
- [ ] γ. κατάβαση κλίσης με επιλογή του 1ου καλύτερου
- [ ] δ. τυχαία επανεκκίνηση
- [ ] ε. κανένα από τα παραπάνω

Ερώτηση 13
Έστω μια απλοποιημένη εκδοχή του προβλήματος 5-Βασιλισσών, όπου σε κάθε στήλη και σε κάθε γραμμή μπορεί να υπάρχει μόνο μία βασίλισσα. Επίσης, ο τελεστής μετάβασης είναι η ανταλλαγή δύο γειτονικών στηλών μεταξύ τους. Να εκτελέσετε τοπική αναζήτηση (ένα βήμα) από την αρχική κατάσταση που φαίνεται στο σχήμα. Ποιο θα είναι το αποτέλεσμα;

[Σχήμα: Σκακιέρα \(5 \times 5\) με 5 βασίλισσες τοποθετημένες μία ανά στήλη και γραμμή.]

  • [ ] α. ο αλγόριθμος θα τερματίσει δίνοντας τη βέλτιστη λύση.
  • [ ] β. ο αλγόριθμος θα δώσει κατάσταση χαμηλότερου κόστους.
  • [ ] γ. ο αλγόριθμος θα δώσει κατάσταση χαμηλότερου κόστους.
  • [ ] δ. ο αλγόριθμος θα τερματίσει παραμένοντας στην ίδια κατάσταση.

2024.jpg

Ερώτηση 14
Ο αλγόριθμος \(WA^*\) (weighted \(A^*\)) χρησιμοποιεί ως συνάρτηση κόστους την \(f(n) = g(n) + w h(n)\), όπου \(w\) θετική σταθερά \(>1\). Ως αποτέλεσμα:
- [ ] α. Ο \(WA^*\) είναι γενικά ταχύτερος από τον \(A^*\).
- [ ] β. Ο \(WA^*\) είναι γενικά αργότερος από τον \(A^*\).
- [ ] γ. Ο \(WA^*\) δεν είναι εγγυημένο ότι θα βρει βέλτιστη λύση, ακόμα κι αν η \(h(n)\) είναι παραδεκτή.
- [ ] δ. Ο \(WA^*\) είναι εγγυημένο ότι θα βρει βέλτιστη λύση, αν η \(h(n)\) είναι παραδεκτή.

Ερώτηση 15
Ποια είναι η προτιμότερη μέθοδος τυφλής αναζήτησης όταν ο χώρος αναζήτησης είναι μεγάλος και το βάθος της λύσης δεν είναι γνωστό;
- [ ] α. Αναζήτηση Πρώτα κατά Βάθος (DFS)
- [ ] β. Αμφίδρομη αναζήτηση (Bidirectional)
- [ ] γ. Επαναληπτική Εκβάθυνση (IDS)
- [ ] δ. \(A^*\)

Ερώτηση 16
Θα αποφεύγαμε ένα εκτενές δέντρο απόφασης επειδή είναι πιθανόν να ...:
- [ ] α. ... είναι πολύ περισσότερο πλατύ απ' ότι βαθύ.
- [ ] β. ... είναι πολύ περισσότερο βαθύ απ' ότι πλατύ.
- [ ] γ. ... έχει υποεκπαιδευθεί.
- [ ] δ. ... έχει υπερεκπαιδευθεί.

Ερώτηση 17
Η συνάρτηση ενεργοποίησης στους νευρώνες που ακολουθούν το μοντέλο των McCulloch-Pitts είναι ...
- [ ] α. ... βηματική
- [ ] β. ... σιγμοειδής
- [ ] γ. ... γραμμική
- [ ] δ. Οτιδήποτε από τα εναλλακτικά που δίνονται.

Ερώτηση 18
Πόσες είναι οι πιθανές έξοδοι ενός νευρώνα που ακολουθεί το μοντέλο των McCulloch-Pitts;
- [ ] α. 2
- [ ] β. 1
- [ ] γ. \(2^n\), όπου n είναι το πλήθος των εισόδων του νευρώνα
- [ ] δ. άπειρες

Ερώτηση 19
Η σιγμοειδής συνάρτηση ενεργοποίησης \(f(x) = 1 / (1 + e^{-x})\) παρουσιάζει τη μέγιστη κλίση της στο ...
- [ ] α. ... \(+\infty\)
- [ ] β. ... \(-\infty\)
- [ ] γ. ... σημείο \(x = 0\)
- [ ] δ. ... σημείο \(x = 1\)

Ερώτηση 20
Ο χρόνος για την εκπαίδευση ενός νευρωνικού δικτύου εμπρόσθιας τροφοδότησης εξαρτάται από ...
- [ ] α. ... το πλήθος των παραδειγμάτων εκπαίδευσης.
- [ ] β. ... το πλήθος των κρυφών επιπέδων.
- [ ] γ. ... τον ρυθμό εκπαίδευσης.
- [ ] δ. ... όλα τα εναλλακτικά που δίνονται.

Ερώτηση 21
Τα Νευρωνικά Δίκτυα στη γενική περίπτωση είναι ......................... με πολλές παραμέτρους.
- [ ] α. Γραμμικές συναρτήσεις
- [ ] β. Μη-γραμμικές συναρτήσεις
- [ ] γ. Διακριτές συναρτήσεις
- [ ] δ. Εκθετικές συναρτήσεις
- [ ] ε. Σύνθετες συναρτήσεις

Ερώτηση 22
Η σιγμοειδής συνάρτηση ενεργοποίησης \(f(x)=1/(1+e^{-x})\) έχει παράγωγο και μέγιστη κλίση αντίστοιχα:
- [ ] α. \(f(x)\) και 1
- [ ] β. \(1-f(x)\) και 0,75
- [ ] γ. \(2f(x)(1-f(x))\) και 0,50
- [ ] δ. \(f(x)(1-f(x))\) και 0,25

2024_PT2.jpg

Ερώτηση 23
Έστω ένας νευρώνας δύο εισόδων \(x_1\) και \(x_2\), με λογιστική συνάρτηση ενεργοποίησης, και τιμές βαρών \(w_1=1\), \(w_2=-1\). Για είσοδους \(x_1=4\) και \(x_2=2\), η έξοδος του νευρώνα είναι 0.5. Ποια είναι η τιμή της πόλωσης \(w_0\) του νευρώνα;
- [ ] α. 0
- [ ] β. -2
- [ ] γ. 2
- [ ] δ. -1

Ερώτηση 24
Ποιο από τα παρακάτω είναι ΣΩΣΤΟ;
- [ ] α. Η πόλωση ενός νευρώνα είναι το βάρος μιας σύνδεσης με είσοδο ίση με -1.
- [ ] β. Το XOR είναι ένα γραμμικά διαχωρίσιμο πρόβλημα ταξινόμησης
- [ ] γ. Η εκπαίδευση ενός νευρώνα με ελαχιστοποίηση του σφάλματος εκπαίδευσης τερματίζει πάντα αν ο ρυθμός μάθησης είναι μικρός.
- [ ] δ. Η εκπαίδευση του perceptron με διόρθωση σφάλματος τερματίζει πάντα αν ο ρυθμός μάθησης είναι μικρός.

Ερώτηση 25
Σε πόσα διαφορετικά σχήματα ανήκουν ταυτόχρονα τα άτομα 01011011 και 00110110;
- [ ] α. 1
- [ ] β. 2
- [ ] γ. 4
- [ ] δ. 8

Ερώτηση 26
Έστω ότι πρόκειται να χρησιμοποιήσουμε γενετικό αλγόριθμο με δυαδική κωδικοποίηση χρωμοσωμάτων για να βρούμε τις τιμές δύο πραγματικών μεταβλητών \(x\) και \(y\) που μεγιστοποιούν μία πολύπλοκη μαθηματική συνάρτηση \(f(x,y)\). Αν το πεδίο ορισμού των μεταβλητών είναι το διάστημα \([-1,1]\) και θέλουμε να προσδιορίσουμε τις τιμές τους με ακρίβεια 3 δεκαδικών ψηφίων, πόσα bits πρέπει να έχει το χρωμόσωμα;
- [ ] α. 8
- [ ] β. 11
- [ ] γ. 18
- [ ] δ. 22

Ερώτηση 27
Όσο πιο μεγάλη είναι η τάξη ενός σχήματος, τόσο ...
- [ ] α. ... μικρότερη είναι η πιθανότητα επιβίωσής του μετά από διασταύρωση.
- [ ] β. ... μεγαλύτερη είναι η πιθανότητα επιβίωσής του μετά από διασταύρωση.
- [ ] γ. ... μικρότερη είναι η πιθανότητα επιβίωσής του μετά από μετάλλαξη.
- [ ] δ. ... μεγαλύτερη είναι η πιθανότητα επιβίωσής του μετά από μετάλλαξη.

Ερώτηση 28
Σε ένα γενετικό αλγόριθμο με δυαδική κωδικοποίηση χρωμοσωμάτων των 32 bits, η συνάρτηση αξιολόγησης ισούται με \(|N_1 - N_0|\), όπου \(N_1\) και \(N_0\) είναι ο αριθμός των 1 και των 0 στο χρωμόσωμα, αντίστοιχα. Αν κατασκευάσουμε ένα αρχικό πληθυσμό 1000 ατόμων με τυχαίο τρόπο, πόσα άτομα βέλτιστης απόδοσης αναμένουμε να υπάρχουν σε αυτόν;
- [ ] α. 0
- [ ] β. 10
- [ ] γ. 100
- [ ] δ. 500

Ερώτηση 29
Έστω ένα σχήμα το οποίο στην αρχική γενιά ενός γενετικού αλγορίθμου ταιριάζει με το 50% των ατόμων του πληθυσμού. Πότε είναι πιο πιθανό το σχήμα αυτό να εξαφανιστεί από τον πληθυσμό σε λίγες γενιές;
- [ ] α. Όταν έχει μικρή τάξη και μικρό οριστικό μήκος.
- [ ] β. Όταν έχει μικρή τάξη και μεγάλο οριστικό μήκος.
- [ ] γ. Όταν έχει μεγάλη τάξη και μικρό οριστικό μήκος.
- [ ] δ. Όταν έχει μεγάλη τάξη και μεγάλο οριστικό μήκος.

Ερώτηση 30
Ποιο από τα παρακάτω ΔΕΝ είναι πρόβλημα ικανοποίησης περιορισμών;
- [ ] α. Η εύρεση βέλτιστης διαδρομής ρομπότ για τη μετακίνηση από μία αρχική σε μία τελική θέση.
- [ ] β. Η κατασκευή του ωρολογίου προγράμματος ενός σχολείου.
- [ ] γ. Ο προσδιορισμός των βαρδιών για τα άτομα του νοσηλευτικού προσωπικού σε ένα νοσοκομείο.
- [ ] δ. Η επίλυση του γρίφου Sudoku.

2024_PT3.jpg

Ερώτηση 31
Ποιος από τους παρακάτω όρους ΔΕΝ σχετίζεται με τις μεθόδους επίλυσης προβλημάτων ικανοποίησης περιορισμών;
- [ ] α. συνέπεια κόμβου
- [ ] β. συνέπεια τόξου
- [ ] γ. προοπτικός έλεγχος
- [ ] δ. ενοποίηση μεταβλητών

Ερώτηση 32
Σε ποιο από τα παρακάτω προβλήματα ικανοποίησης περιορισμών η εφαρμογή του αλγορίθμου AC-3 θα καταλήξει σε αποτέλεσμα που το πεδίο κάθε μεταβλητής θα είναι το κενό σύνολο \(\{\ \}\);
- [ ] α. Πεδία: \(D_X = D_Y = D_Z = D_W = \{1,2,3\}\). Περιορισμοί: \(X \neq Y,\ X \neq Z,\ X \neq W,\ Y \neq Z,\ Y \neq W,\ Z \neq W\).
- [ ] β. Πεδία: \(D_X = D_Y = D_Z = D_W = \{1,2,3,4,5,6,7,8,9\}\). Περιορισμοί: \(X < Y,\ Y < Z,\ Z < W,\ W < X\).
- [ ] γ. Πεδία: \(D_X = D_Y = D_Z = D_W = \{1,2,3,4\}\). Περιορισμοί: \(X = Y + Z,\ Z = 2 \cdot W,\ X = 3 \cdot Y\).
- [ ] δ. Πεδία: \(D_X = D_Y = D_Z = D_W = \{1,2,4,8\}\). Περιορισμοί: \(X = 2 \cdot Y^2 = Z^3 = 8 \cdot W\).

Ερώτηση 33
Αν εφαρμόσουμε τον αλγόριθμο AC-3 σε ένα πρόβλημα ικανοποίησης περιορισμών, αποκλείεται να ...
- [ ] α. ... διαγραφούν όλες οι τιμές από τα πεδία όλων των μεταβλητών.
- [ ] β. ... παραμείνουν αμετάβλητα τα πεδία όλων των μεταβλητών.
- [ ] γ. ... εισαχθεί ένα νέο στοιχείο στο πεδίο μίας μεταβλητής.
- [ ] δ. ... βρεθεί απ' ευθείας λύση του προβλήματος χωρίς να χρειάζεται να γίνει αναζήτηση.

Ερώτηση 34
Η πρόταση «οι αδελφοί Κοέν είναι ακριβώς δύο» παριστάνεται σε ΚΛ ως εξής:
- [ ] α. \((\exists x)\ (\exists y)\ (\text{αδελφόςΚοέν}(x) \land \text{αδελφόςΚοέν}(y) \land x \neq y \land (\forall z)\ (\text{αδελφόςΚοέν}(z) \Rightarrow ((z=x) \lor (z=y))))\)
- [ ] β. \((\exists x)\ (\text{αδελφόςΚοέν}(x) \land (\exists y)\ (\text{αδελφόςΚοέν}(y)))\)
- [ ] γ. \((\exists x)\ (\exists y)\ (\forall z)\ (\text{αδελφόςΚοέν}(x) \land \text{αδελφόςΚοέν}(y) \land x \neq y \land (\neg\text{αδελφόςΚοέν}(z) \lor (z \neq x) \lor (z \neq y)))\)
- [ ] δ. \((\forall x)\ (\forall y)\ ((\text{αδελφόςΚοέν}(x) \land \text{αδελφόςΚοέν}(y)) \Rightarrow x=y)\)

Ερώτηση 35
Για να αποδείξουμε μέσω αντίκρουσης της αντίφασης τον τύπο \((\forall x)\ p(x)\), πρέπει να προσθέσουμε στη βάση γνώσης μας τον τύπο:
- [ ] α. \(p(x)\)
- [ ] β. \(\neg p(x)\)
- [ ] γ. \(p(\text{σταθερά})\)
- [ ] δ. \(\neg p(\text{σταθερά})\)

Ερώτηση 36
Ποια πρόταση μπορεί να προκύψει μετά την εφαρμογή της διαδικασίας αναγωγής μεταξύ των προτάσεων \(p \lor \neg q \lor \neg r\) και \(q \lor \neg s\);
- [ ] α. Η πρόταση \(q \lor \neg q\).
- [ ] β. Η πρόταση \(p \lor \neg q \lor \neg r \lor q \lor \neg s\).
- [ ] γ. Η πρόταση \(p \lor \neg r \lor \neg s\).
- [ ] δ. Δεν μπορεί να προκύψει καμία πρόταση, γιατί δεν είναι δυνατόν να εφαρμοσθεί αναγωγή μεταξύ των δεδομένων προτάσεων.

Ερώτηση 37
Ποια είναι η ΣΚΜ της πρότασης \((\forall x)\ (((\exists y) P(x, y)) \Rightarrow Q(x))\);
- [ ] α. \(P(x, y) \lor Q(x)\)
- [ ] β. \(\neg P(x, y) \lor Q(x)\)
- [ ] γ. \(P(x, y) \land Q(x)\)
- [ ] δ. \(\neg P(x, Sk(x)) \lor Q(x)\)

Ερώτηση 38
Από τι αποτελείται ένα πρόγραμμα Prolog;
- [ ] α. Δηλώσεις και εντολές
- [ ] β. Γεγονότα και κανόνες
- [ ] γ. Συναρτήσεις
- [ ] δ. Δηλώσεις, εντολές, γεγονότα, κανόνες και συναρτήσεις

Ερώτηση 39
Η κενή λίστα στην Prolog συμβολίζεται με:
- [ ] α. NULL
- [ ] β. [ [ ] ]
- [ ] γ. [ ]

[Λείπει από τη φωτογραφία: η επιλογή δ της ερώτησης 39.]

5.jpg

Ερώτηση 40
Η ερώτηση Prolog «?- append([a,b], L, [a,c,b,a,b]).» έχει ως απάντηση την:
- [ ] α. L = [a,c,b].
- [ ] β. L = [c,a,b].
- [ ] γ. L = [c,b,a].
- [ ] δ. false.

Ερώτηση 41
Ποια/ποιες ερώτηση/ερωτήσεις Prolog θα μπορούσαν να λάβουν ως μόνη απάντηση την «L = [a,b].»;
- [ ] α. ?- member(L, [a,b]).
- [ ] β. ?- member(L, [[a,b],a,b]).
- [ ] γ. ?- member(L, [[a,b]]).
- [ ] δ. ?- member(L, [[a], [b]]).

Ερώτηση 42
Σ' ένα γράφο περιορισμών
- [ ] α. Οι κόμβοι παριστάνουν περιορισμούς και οι ακμές μεταβλητές
- [ ] β. Οι κόμβοι παριστάνουν μεταβλητές και οι ακμές περιορισμούς.
- [ ] γ. Οι κόμβοι παριστάνουν πεδία τιμών και οι ακμές μεταβλητές.
- [ ] δ. Οι ακμές είναι πάντα μονής κατεύθυνσης.

Ερώτηση 43
Σ' ένα πρόβλημα συμπλήρωσης σταυρόλεξου, δίνεται ένα πλέγμα NXN, όπου θα πρέπει να συμπληρωθούν M λέξεις-θέσεις με διάφορα μήκη από ένα δεδομένο σύνολο λέξεων D. Στην προσπάθεια να αναπαραστήσουν το πρόβλημα ως πρόβλημα ικανοποίησης περιορισμών, 4 μαθητές πρότειναν τα παρακάτω. Επιλέξετε την καλύτερη σωστή πρόταση.
- [ ] α. Ορίζω NXN μεταβλητές με πεδίο ορισμού για κάθε μια το D.
- [ ] β. Ορίζω M μεταβλητές με πεδίο ορισμού για κάθε μια το D.
- [ ] γ. Ορίζω M μεταβλητές με πεδίο ορισμού για κάθε μια το υποσύνολο του D με λέξεις ίδιου μήκους με τη λέξη-θέση που αντιπροσωπεύει.
- [ ] δ. Ορίζω N μεταβλητές με πεδίο ορισμού για κάθε μια το D.

Ερώτηση 44
Δίνεται ένα σύνολο δεδομένων και ένα δέντρο απόφασης που εκπαιδεύτηκε με βάση αυτά τα δεδομένα.

Example crust size shape filling size Class
e1 big circle small pos
e2 small circle small pos
e3 big square small neg
e4 big triangle small neg
e5 big square big pos
e6 small square small neg
e7 small square big pos
e8 big circle big pos

[Σχήμα: Δέντρο απόφασης με ρίζα shape. Διακλαδώσεις: circle \(\to (+)\), triangle \(\to (-)\), sq \(\to\) κόμβος filling size με κλάδους big \(\to (+)\) και small \(\to (-)\).]

Στη συνέχεια, ενδιαφερόμαστε να ελέγξουμε το δέντρο με το παρακάτω δεδομένο εισόδου:
(crust-size = small) AND (shape = triangle) AND (filling-size = small)
Ποια από τις παρακάτω προτάσεις περιγράφει καλύτερα το τι θα γίνει με το δεδομένο εισόδου;
- [ ] α. Ακολουθεί τον κλάδο \((shape = circle)\), οπισθοδρομεί, ακολουθεί τον κλάδο \((shape = square)\), οπισθοδρομεί, ακολουθεί τον κλάδο \((shape = triangle) \to\) "-", σταματάει και ταξινομείται ως "-".
- [ ] β. Ακολουθεί τον κλάδο \((shape = triangle) \to\) "-", οπισθοδρομεί, απορρίπτει τους κλάδους \((shape = circle)\) και \((shape = square)\), σταματάει και ταξινομείται ως "-".
- [ ] γ. Ακολουθεί τον κλάδο \((shape = triangle) \to\) "-", σταματάει και ταξινομείται ως "-".
- [ ] δ. Ακολουθεί τον κλάδο \((shape = triangle) \to\) "-", σταματάει και δεν ταξινομείται γιατί από το δέντρο απόφασης λείπουν οι υπόλοιποι έλεγχοι.

Ερώτηση 45
Τι αναπαριστά η πρόταση
$\(\forall x \forall y \forall z (\neg \text{Φοιτητής}(x) \lor \neg \text{Αμάξι}(y) \lor \neg \text{Ανήκει}(y, x) \lor (\text{Πατέρας}(z, x) \Rightarrow \text{Έμπορος}(z))):\)$
- [ ] α. Όσοι φοιτητές έχουν αμάξι, έχουν πατέρα έμπορο.
- [ ] β. Όλοι όσοι δεν είναι φοιτητές ή δεν έχουν αμάξι, έχουν πατέρα έμπορο.
- [ ] γ. Αν ο πατέρας κάποιου είναι έμπορος, τότε είτε δεν είναι φοιτητής είτε δεν έχει αμάξι.
- [ ] δ. Αν ο πατέρας κάποιου είναι έμπορος, τότε δεν είναι φοιτητής και έχει αμάξι.

6.jpg

Ερώτηση 46
Δίνεται ένα σύνολο δεδομένων και ένα δέντρο απόφασης που εκπαιδεύτηκε με βάση αυτά τα δεδομένα. Στη συνέχεια, ενδιαφερόμαστε να ελέγξουμε το δέντρο με το παρακάτω δεδομένο εισόδου:
(crust-size = small) AND (shape = triangle) AND (filling-size = small)
Ποια από τις παρακάτω προτάσεις περιγράφει καλύτερα το τι θα γίνει με το δεδομένο εισόδου;

[Σχήμα: Δέντρο απόφασης με ρίζα crust size. Διακλαδώσεις: big \(\to\) κόμβος filling size (big \(\to (+)\), small \(\to\) κόμβος shape (circle \(\to (+)\), tri/sq \(\to (-)\))), small \(\to\) κόμβος shape (circle \(\to (+)\), sq \(\to\) κόμβος filling size (big \(\to (+)\), small \(\to (-)\))).]

  • [ ] 1. Ακολουθεί τον κλάδο (crust-size = small), σταματάει και δεν ταξινομείται γιατί από το δέντρο απόφασης λείπει ο έλεγχος (shape = triangle).
  • [ ] 2. Ακολουθεί τον κλάδο (crust-size = small), ανακαλύπτει ότι λείπει ο έλεγχος (shape = triangle) και ακολουθεί τον κλάδο (shape = square), διότι αμέσως μετά υπάρχει ο κλάδος (filling-size = small) που ταιριάζει, σταματάει και ταξινομείται ως "-".
  • [ ] 3. Ακολουθεί τον κλάδο (crust-size = small), ανακαλύπτει ότι λείπει ο έλεγχος (shape = triangle) και εξετάζει εξ αρχής όλα τα φύλλα του δέντρου απόφασης από κάτω προς τα πάνω, για να βρει αυτό που ταιριάζει σε πιο πολλά σημεία με το δεδομένου εισόδου.
  • [ ] 4. Κανένα από τα εναλλακτικά που δίνονται δεν ισχύει.

Ερώτηση 47
Έχουμε ένα σύνολο δεδομένων το οποίο περιέχει 6 σημεία που χαρακτηρίζονται ως Χ και 6 σημεία που χαρακτηρίζονται ως Υ. Τα διαχωρίζουμε σε 2 υποσύνολα, καθένα από τα οποία περιέχει 3 σημεία Χ και 3 σημεία Υ.
Ποια ήταν η αρχική ποσότητα πληροφορίας, \(I_0\), και ποιό ήταν το κέρδος πληροφορίας από το [δυσανάγνωστο] χωρισμό, \(I_G\);
- [ ] 1. \(I_0 = 1\text{ bit},\ I_G = 0\text{ bits}\)
- [ ] 2. \(I_0 = 1\text{ bit},\ I_G = 1\text{ bit}\)
- [ ] 3. \(I_0 = \frac{1}{2}\text{ bits},\ I_G = \frac{1}{2}\text{ bits}\)
- [ ] 4. \(I_0 = 0\text{ bits},\ I_G = 0\text{ bits}\)

Ερώτηση 48
Σε ένα σύνολο 16 παραδειγμάτων, τα 8 ανήκουν στην κλάση \(C_1\) και τα υπόλοιπα 8 στην κλάση \(C_2\). Πόση είναι η εντροπία του συνόλου;
- [ ] 1. 0,00
- [ ] 2. 0,25
- [ ] 3. 0,50
- [ ] 4. 1,00

Ερώτηση 49
Δίδεται η παρακάτω βάση κανόνων.

R1: if A and B then C          R5: if C and ¬D then I
R2: if C and D then E          R6: if E and I then ¬H
R3: if A and I then ¬H         R7: if E and H then ¬G
R4: if A and ¬D then E         R8: if E and ¬H then G
Ζητείται να εξαχθεί το G, αν το αρχικό περιεχόμενο της μνήμης εργασίας είναι ME = {A, B, ¬D, E}. (α) Αν χρησιμοποιηθεί αλυσίδωση προς τα εμπρός (forward chaining) και ως στρατηγική ελέγχου η εξής: ο πρώτος υποψήφιος κανόνας που συναντάται πυροδοτείται (σειρά αναγραφής), ενώ ο ίδιος κανόνας πυροδοτείται μόνο μια φορά.
(β) Αν χρησιμοποιηθεί ως στρατηγική ελέγχου η προσφατότητα και δευτερευόντως η σειρά αναγραφής, τότε:
- [ ] α. Το G εξάγεται σε λιγότερα βήματα με τη μέθοδο (α).
- [ ] β. Το G εξάγεται σε λιγότερα βήματα με τη μέθοδο (β).
- [ ] γ. Θα κάνουν τα ίδια βήματα επειδή όλοι οι κανόνες έχουν το ίδιο πλήθος συνθηκών.
- [ ] δ. Εξαρτάται από τη δευτερεύουσα στρατηγική.

IMG_4633.png

ΘΕΜΑ 4ο (μονάδες 20) Δίνεται η παρακάτω βάση κανόνων με συντελεστές βεβαιότητας (με πλάγια γραφή εμφανίζονται οι μεταβλητές):

R1
if is(shape, round)
then assert(fruit, mandarin) (0.4)
R4
if is(shape, round)
and is(color, red)
then assert(fruit, apple) (0.7)
R2
if is(shape, round)
then assert(fruit, apple) (0.3)
R5
if is(shape, round)
and is(color, red)
and is(size, small)
then assert(fruit, apple) (0.5)
R3
if is(shape, round)
and is(surface, weasand)
then assert(fruit, mandarin) (0.8)
R6
if is(shape, round)
and is(size, small)
then assert(fruit, mandarin) (0.6)

Δίνονται τα εξής δεδομένα διαδοχικά: "is(shape, round)", "is(surface, weasand) (-0.5)", "is(color, red) (0.8)", "is(size, small) (0.4)". Περιγράψτε τα βήματα εξαγωγής συμπεράσματος όταν μας ενδιαφέρει η τιμή της μεταβλητής fruit. Ποια τιμή θα επιστραφεί;

Επιπλέον πηγές χωρίς μεταγραφή εδώ (λύσεις → 2024-06.solutions.md, ή διπλότυπες φωτογραφίες της ίδιας σελίδας): 3.jpg, 4.jpg, 7beda7bd8d842b2d.png, 2024_PT4.jpg, 4c11b8bb67d56b46.png, 2024-09-18_4.01.54_.png, 50aeae71485323cf.png

Λύσεις (⚪ AI, μη επαληθευμένο)

Κατάσταση: ⚪ AI, μη επαληθευμένο Πηγή: migrated from previous_exams.md (Antigravity, 2026-10)

Προσοχή

Ερώτηση 9: η λύση θεωρεί ορθό το «α» (ότι ο greedy αλγόριθμος βρίσκει πάντα βέλτιστη λύση με παραδεκτή ευρετική)· αυτό είναι λανθασμένο, αφού η greedy αναζήτηση δεν εγγυάται βέλτιστη λύση ούτε με παραδεκτή ευρετική. Η ορθή συνολική απάντηση χρειάζεται επαλήθευση. Ερώτηση 14: η λύση απορρίπτει το «γ» (ο WA* δεν εγγυάται βέλτιστη λύση ακόμη κι αν η h(n) είναι παραδεκτή) ως λανθασμένο, αλλά για w > 1 ο ισχυρισμός αυτός είναι ορθός· ταυτόχρονα το «α» (ταχύτερος από τον A*) είναι γενικά ορθό. Η απάντηση χρειάζεται επαλήθευση. Ερώτηση 25: η λύση δίνει πρώτα το «δ» (8) και στη συνέχεια (μετά την ερώτηση «could it be 2?») το «β» (2). Οι δύο απαντήσεις είναι αντιφατικές· δεν επαληθεύτηκε ποια είναι σωστή. Ερώτηση 40: η λύση δίνει το «α» (L = [a,c,b]). Η ερώτηση append([a,b], L, [a,c,b,a,b]) δεν έχει λύση, αφού η τρίτη λίστα δεν αρχίζει από a, b· η ορθή απάντηση φαίνεται να είναι το «δ» (false). Οι ερωτήσεις 14 (WA*), 22 (σιγμοειδής), 39 (κενή λίστα Prolog) και 25 (συνέχεια) αντιστοιχίστηκαν με βάση το κείμενο της ερώτησης, επειδή το παλιό αρχείο δεν έχει αρίθμηση σε αυτά τα σημεία.

Λύσεις — Τεχνητή Νοημοσύνη — Ιούνιος 2024

Λύσεις AI μεταφερμένες αυτούσιες από το παλιό previous_exams.md (χωρίς επαλήθευση)· η αρίθμηση των ερωτήσεων ακολουθεί την εξέταση Ιουνίου 2024. Ερωτήσεις που δεν υπάρχουν στο παλιό αρχείο λείπουν.

Ερώτηση 7

The correct answer is: c. Always holds. Here's why: An admissible heuristic function h is a function that never overestimates the true cost of reaching the goal from any given state. In other words, it always returns an estimate that is less than or equal to the actual cost.

[Σελίδα 26] If we have two admissible heuristic functions, h1 and h2, then their weighted sum, kh1 + mh2, will also be admissible as long as k ≥ 0 and m ≥ 0. However, the question states that we need to consider the condition k + m ≤ 1. To understand why this is true, let's analyze what happens when k + m > 1. When k + m > 1, it means that the weights are dominated by one of them (either k or m), and the other weight has a smaller magnitude. In this case, kh1 + mh2 will be very similar to either kh1 (if k is much larger than m) or mh2 (if m is much larger than k). Since h1 and h2 are admissible, their weighted sums (either kh1 or mh2) will also be admissible. Therefore, even when k + m > 1, the weighted sum of the two admissible heuristic functions will remain admissible. In other words, the condition k + m ≤ 1 is actually not necessary for kh1 + mh2 to be admissible, as long as h1 and h2 are themselves admissible.

Ερώτηση 9

The correct answers are: a, c, and d Here's why: Greedy search is a simple and intuitive algorithm that makes decisions based on local optimality. Here are some properties of greedy search: * Option a: This statement is true. If the heuristic function used by greedy search is admissible (i.e., never overestimates the true cost), then greedy search will always find an optimal solution. * Option c: This statement is also true. When the costs of the edges are unit, greedy search will expand fewer nodes than A*, because it only needs to consider the immediate next node based on local optimality. However, option b is incorrect:

[Σελίδα 28] * Option b: This statement is false. Greedy search can actually expand more nodes than A* in some cases, especially when the heuristic function is not admissible or has high error rates. In general, greedy search does not have a guaranteed bound on the number of nodes it expands. Now, let's consider why option d is correct: * Option d: This statement is true. Greedy search does not guarantee finding an optimal solution, even when using an admissible heuristic function. It can get stuck in local optima and fail to find the global optimum. The other options can be eliminated as follows: * Option b: Expanding fewer nodes than A* is not a general property of greedy search. * Options c and d are correct, but option a is also correct, making this question a bit tricky.

Ερώτηση 10

The correct answer is: a. ... to avoid cycles. Here's why: In many search methods, such as Breadth-First Search (BFS), Depth-First Search (DFS), and A* search, a "closed" list or set of states is maintained in addition to the open list. The primary purpose of the closed list is to keep track of nodes that have already been visited and expanded. This allows the algorithm to avoid revisiting the same node multiple times and getting stuck in an infinite loop. In other words, the closed list helps prevent the search algorithm from exploring cycles or loops that may lead to an infinite loop. Now, let's examine each option:

[Σελίδα 29] * Option a: As mentioned earlier, the main purpose of the closed list is to avoid cycles. * Option b: While finding the optimal solution is a primary goal of many search methods, it's not the main reason for maintaining a closed list. * Option c: Increasing the speed of the method is not directly related to the use of a closed list. The speed of the algorithm is influenced by factors such as the efficiency of node expansion and the heuristic function used. * Option d: Reducing required memory is also not the primary reason for maintaining a closed list. While it's true that using a closed list can help reduce memory requirements, this is not its main purpose. The other options can be eliminated as follows: * Options b, c, and d are not correct reasons why a closed list is mainly used. * Option e: There is no option e.

Ερώτηση 11

The correct answer is: a. ... considering the TSP as a search problem for finding the shortest path between two cities. Here's why: The Traveling Salesman Problem (TSP) is a classic problem in combinatorial optimization and computer science, where the goal is to find the shortest possible tour that visits all cities and returns to the starting city. In this context, A* search can be applied by considering each city as a node in a graph, and the edges between nodes representing the distances between cities. The heuristic function used would estimate the distance from the current city to the next one, based on some admissible strategy (e.g., using Euclidean distances). However, TSP is not exactly equivalent to finding the shortest path between two cities. It's more like searching for the shortest tour that visits a set of cities and returns to the starting point.

[Σελίδα 30] Now, let's examine each option: * Option a: This answer is correct because A* can be applied to find the shortest path between two cities in a graph. * Option b: This answer is incorrect because considering each state as a list of all cities would not lead to an efficient search algorithm for TSP. * Option c: This answer is incorrect because there are admissible heuristics that can guide the A* search towards good solutions, such as using Euclidean distances or other approximations. * Option d: This answer is incorrect because adding a new city to the route does not accurately represent the transition function needed for TSP. The other options can be eliminated as follows: * Options b, c, and d are not correct ways to apply A* to TSP.

Ερώτηση 12

The correct answer is: a. steepest descent with best choice Here's why: Simulated annealing is a global optimization algorithm that uses a temperature schedule to control the exploration of the solution space. The temperature starts high and gradually decreases over time. When the temperature T0 is low, the simulated annealing algorithm behaves in a deterministic way, similar to steepest descent with best choice. This means that it will always choose the next solution that has the lowest cost (or highest objective function value) among all possible solutions generated at that temperature. In other words, when the temperature is low, the algorithm will follow the gradient of the cost function and move towards the optimal solution in a deterministic manner. This behavior is similar to steepest descent with best choice, which also follows the negative gradient of the cost function.

[Σελίδα 31] Now, let's examine each option: * Option a: This answer is correct because when T0 is low, simulated annealing behaves like steepest descent with best choice. * Option b: This answer is incorrect because when T0 is low, simulated annealing does not behave like steepest descent with random choice (stochastic). * Option c: This answer is incorrect because when T0 is low, simulated annealing does not behave like steepest descent with first best choice. * Option d: This answer is incorrect because simulated annealing does not behave like random restart when T0 is low. * Option e: This answer is incorrect because one of the options above (option a) is correct. The other options can be eliminated as follows: * Options b, c, and d are not correct behaviors of simulated annealing when T0 is low.

Ερώτηση 13

The correct answer is: c. The algorithm will give a state of lower cost (or at least not a higher cost). Here's why: In this simplified 5-Queens problem, we have 5 columns, and each column can only contain one queen. We're also given an initial state, where the queens are placed in rows 1 through 5. The transition operator is the exchange of two adjacent columns. This means that we can swap the positions of two adjacent queens (i.e., the queens in columns i and i+1) to get a new state. From the initial state shown in the figure, let's perform one step of local search using this transition operator:

[Σελίδα 32] Initial State:

Q |  |  |  | 
---------
| Q |  |  | 
---------
|  | Q |  | 
---------
|  |  | Q | 
---------
|  |  |  | Q
We can swap the positions of the queens in columns 1 and 2 (i.e., the first two columns) to get a new state: New State:
Q | Q |  |  | 
---------
|  | Q |  | 
---------
|  |  | Q | 
---------
|  |  |  | Q
---------
|  |  |  | Q
In this new state, the cost (or number of conflicts) is reduced from 3 to 2. This means that the algorithm will give a state of lower cost. Now, let's examine each option: * Option a: This answer is incorrect because local search may not terminate immediately giving the optimal solution. * Option b: This answer is correct, but it duplicates option c. * Option c: This answer is correct, and it indicates that the algorithm will give a state of lower cost (or at least not a higher cost). * Option d: This answer is incorrect because local search will not terminate remaining in the same state.

Ερώτηση 14

The correct answer is: a. WA is generally faster than A.** Here's why: In the weighted A* (WA*) algorithm, the cost function \(f(n)\) is defined as: [f(n) = g(n) + wh(n)] where \(w\) is a positive constant greater than 1. Since \(w > 1\), the weight factor \(wh(n)\) will always be greater than or equal to \(h(n)\). This means that WA* will give more importance to the heuristic value \(h(n)\) compared to A*, which uses only the actual cost \(g(n)\) and the estimated heuristic value \(h(n)\). As a result, WA* will tend to explore nodes with higher estimated heuristic values more quickly, which can lead to faster convergence to the optimal solution. This is why WA* is generally faster than A*. Now, let's analyze the other options: b. WA is generally slower than A.** This statement is incorrect because WA* is actually designed to be faster than A*, not slower. c. WA is not guaranteed to find an optimal solution, even if h(n) is admissible.* While this statement might seem plausible, it's actually false. Even with the weighted cost function, WA* can still guarantee finding an optimal solution as long as the heuristic value \(h(n)\) is admissible (never overestimates the true cost). d. WA is guaranteed to find an optimal solution if h(n) is admissible.* While this statement is technically correct, it's not entirely accurate. Even if \(h(n)\) is admissible, there are

[Σελίδα 2] cases where WA* might still get stuck in an infinite loop or fail to converge, especially when dealing with complex graphs. However, if you assume that the graph is sufficiently "nice" (e.g., has no cycles), then yes, WA* will still be guaranteed to find an optimal solution as long as \(h(n)\) is admissible.

Ερώτηση 15

The correct answer is: c. Iterative Deepening Search (IDS) Here's why: When the search space is large, the depth of the solution is unknown, and we need to explore as much of the graph as possible without any prior knowledge about the optimal path, then Iterative Deepening Search (IDS) is the preferred method of blind search. Why IDS? IDS works by iteratively increasing the maximum allowed depth in a depth-first search, starting from 1 and incrementing it until a solution is found. This approach ensures that the algorithm explores as much of the graph as possible at each depth level before moving on to the next one. Since we don't know the optimal path or depth, IDS allows us to explore the entire graph exhaustively, which makes it suitable for large search spaces where the optimal solution might be anywhere. Why not DFS? While Depth-First Search (DFS) is a good starting point for exploring graphs, it has some limitations when dealing with unknown depths. Specifically: * If the depth of the solution is unknown and potentially very large, DFS may get stuck in an infinite loop or

[Σελίδα 3] fail to find the optimal solution. * In DFS, we explore as far as possible along each branch before backtracking. This means that if the optimal solution lies at a greater depth than our maximum allowed depth, DFS will miss it. Why not Bidirectional Search? While Bidirectional Search can be effective for finding the shortest path in graphs with known depths or symmetrical properties, it's not suitable when: * The search space is very large. * The optimal solution might lie anywhere within a potentially vast range of depths. * We don't have any prior knowledge about the graph structure. In such cases, bidirectional search can lead to unnecessary exploration and computational overheads. Why not A*? While A* is an excellent algorithm for finding shortest paths in graphs with known depths or heuristic estimates, it's not the best choice when: * The depth of the solution is unknown. * We don't have any prior knowledge about the optimal path or graph structure. * The search space is very large. In such cases, A* might get stuck in an infinite loop or fail to converge due to its reliance on admissible heuristics.

Ερώτηση 16

The correct answer is: b. ... be much deeper than wide. Here's why:

[Σελίδα 4] A decision tree is a hierarchical representation of possible decisions, where each node represents a choice or outcome. When we say that a decision tree is "extensive", we mean it has a large number of nodes and branches. In an extensive decision tree, the following issues might arise: * Combinatorial explosion: As the number of choices increases, the number of possible paths through the tree grows exponentially. This can lead to an extremely wide decision tree with many branches, but not necessarily deeper. * Difficulty in pruning: An extensive decision tree can be difficult to prune or reduce in size without sacrificing accuracy. In such cases, a shallow and wide decision tree is not ideal because it's: * Harder to train accurately * More prone to overfitting (see below) * Less interpretable Now, let's examine the other options: a. ... be much wider than deep. This statement is actually incorrect for an extensive decision tree. While a wide decision tree can occur when there are many branches, it's not necessarily true that an extensive decision tree would be much wider than deep. c. ... be undertrained. Undertraining occurs when a model or decision tree isn't complex enough to capture the underlying relationships in the data. This is not directly related to the structure of an extensive decision tree. d. ... be overtrained. Overtraining, also known as overfitting, occurs when a model is too complex and fits the training data too closely, but fails to generalize well to new or unseen data. While this can happen with extensive decision trees, it's not the primary concern in such cases.

Ερώτηση 17

The correct answer is: a. ... step-wise Here's why: The McCulloch-Pitts (M-C) model, also known as the threshold logic unit, was one of the first mathematical models for artificial neural networks. It was proposed by Warren McCulloch and Walter Pitts in 1943. In the M-C model, each neuron has a binary output (0 or 1), which is determined by a simple step function: * If the weighted sum of inputs exceeds a certain threshold, the neuron outputs 1. * Otherwise, it outputs 0. This step-wise activation function is still used in some basic neural network models and is an important part of many learning algorithms. Now, let's examine the other options: b. ... sigmoid While sigmoidal functions, such as the logistic or tanh functions, are commonly used as activation functions in modern neural networks, they were not a part of the original McCulloch-Pitts model. The sigmoid function was actually first introduced by mathematicians like Adolphe Quetelet and Pierre-Simon Laplace, but it gained popularity with the work of Frank Yates on binary-choice experiments in the 1930s. c. ... linear A linear activation function, where each neuron's output is directly proportional to its weighted input, would not produce a binary output as required by the McCulloch-Pitts model. While linear functions can be used as activation functions in some neural networks, they are not typically associated with the M-C model. d. ... any of the given alternatives This option is incorrect because it implies that the correct answer could be one of the three other options (sigmoidal, linear, or any of them). As we've seen above, however, only the step-wise activation function is a direct fit for the McCulloch-Pitts model.

[Σελίδα 6]

Ερώτηση 18

The correct answer is: a. 2 Here's why: In the McCulloch-Pitts (M-C) model, each neuron has a binary output (0 or 1), which means it can have only two possible outputs. This simplicity was a deliberate design choice by Warren McCulloch and Walter Pitts, who wanted to create a mathematical model for artificial neural networks that could mimic the behavior of biological neurons. By limiting the output to just two values, they made the M-C model more manageable and easier to analyze. Now, let's examine the other options: b. 1 While each neuron in the McCulloch-Pitts model has only one value (0 or 1) as its output, saying that a neuron has "only" one possible output is a bit misleading. The truth is, a neuron can have exactly two possible outputs: 0 and 1. c. 2^n, where n is the number of inputs to the neuron This option is not correct for the McCulloch-Pitts model because it implies that the number of possible outputs depends on the number of inputs (n). While this might be true in some neural network models with multiple layers or more complex activation functions, it's not a characteristic of the original McCulloch-Pitts model. In fact, the output of a single neuron in the M-C model is always binary and independent of its input values. The number of possible outputs (2) does not change regardless of how many inputs are coming into the neuron.

[Σελίδα 7] d. infinite This option is certainly incorrect because it implies that a neuron in the McCulloch-Pitts model can have an unbounded or unlimited number of possible outputs. As we've seen above, the output of each neuron is always binary (0 or 1), making this option clearly wrong.

Ερώτηση 19

The correct answer is: c. ... point x = 0 Here's why: The sigmoid function, also known as the logistic function, has a characteristic "S"-shaped curve. The maximum slope of this curve occurs when the input (x) is equal to zero. To see why, let's take the derivative of the sigmoid function with respect to x: f'(x) = d/dx [1/(1+e^-x)] Using the chain rule and the fact that e^(-x) is a decreasing function, we get: f'(x) = -e^(-x) / (1 + e^(-x))^2 Now, let's find the value of x that maximizes the slope f'(x): Maximizing f'(x) means finding the value of x for which f'(x) is greater than zero. This occurs when: -e^(-x) > 0 Taking the logarithm base e on both sides and simplifying, we get: -x < ln(e)

[Σελίδα 8] -x < 1 Multiplying by -1 (which flips the inequality), we get: x > -1 So, the maximum slope of the sigmoid function occurs when x is greater than -1. But what about the exact value of x that maximizes the slope? To answer this, let's consider the fact that e^(-x) approaches 0 as x goes to positive infinity. This means that for sufficiently large values of x, f'(x) will become arbitrarily close to zero. Now, let's examine the four options: a. +8 This option is not correct because it implies that the maximum slope occurs at a value of x that is too far away from the origin (i.e., x = 0). b. -8 This option is also incorrect for the same reason as above. c. ... point x = 0 As we've shown, this option is correct because it represents the exact value of x at which the maximum slope occurs. d. ... point x = 1 While the sigmoid function does have a significant increase in slope around x = 1, it's not the maximum slope that occurs at this value of x.

Ερώτηση 20

The correct answer is:

[Σελίδα 9] d. ... all of the given alternatives Here's why: Training a feedforward neural network (FNN) can be influenced by several factors, including: 1. Number of training examples: More training data means more information for the algorithm to learn from, which generally increases training time. 2. Number of hidden layers: While each additional layer can potentially increase the capacity and accuracy of the network, it also adds complexity and can lead to longer training times. 3. Learning rate: The learning rate controls how quickly the model learns from each example. A high learning rate can speed up training but may also cause oscillations or overshooting. Conversely, a low learning rate can result in slower convergence. To see why all these factors are important, let's consider what happens during the backpropagation algorithm used to train FNNs: 1. Forward pass: The network processes each input example and computes its output. 2. Error computation: The difference between the predicted output and the actual label is calculated for each example. 3. Backward pass: The error gradients are computed for all weights and biases, which involves propagating the errors backward through the network. Now, let's examine why each factor affects training time: a. ... the number of training examples As you add more examples to the dataset, the algorithm needs to process more data, which increases the total computation time. b. ... the number of hidden layers Each additional layer adds more weights and biases that need to be updated during backpropagation, leading to increased computation times. c. ... the learning rate A high learning rate can speed up training by allowing larger updates, but it may also lead to overshooting or oscillations. Conversely, a low learning rate ensures stability but results in slower convergence. So, all these factors contribute to the overall time required for training an FNN. Now, let's examine the four options:

[Σελίδα 10] a. ... the number of training examples This option is not correct because it only accounts for one factor affecting training time. b. ... the number of hidden layers Similarly, this option is not entirely correct as it leaves out other important factors like learning rate and number of training examples. c. ... the learning rate While the learning rate does affect training time, it's not the only factor at play here. d. ... all of the given alternatives As we've discussed, all these factors contribute to the overall training time for an FNN.

Ερώτηση 21

The correct answer is: b. Non-linear functions Here's why: Neural networks, by their very nature, can learn and represent complex relationships between inputs and outputs. These relationships are often non-linear in nature. To understand why neural networks are non-linear functions, let's consider the basic building block of a neural network: the neuron (or node). Each neuron takes one or more inputs, applies an activation function to them, and produces an output. The activation function is a mathematical operation that introduces non-linearity into the model. Common examples include:

[Σελίδα 11] * Sigmoid (logistic) function: f(x) = 1/(1+e^-x) * ReLU (Rectified Linear Unit): f(x) = max(0, x) * Tanh (hyperbolic tangent): f(x) = 2/(1 + e^(-2x)) - 1 These functions are non-linear because they do not produce linear relationships between inputs and outputs. In fact, the output of each neuron is a function of its input(s), which can lead to complex interactions and patterns in the data. Now, let's examine why neural networks are not linear functions: a. Linear functions A linear function takes one or more inputs and produces an output that is a simple sum (or weighted sum) of those inputs. Examples include straight lines, planes, and hyperplanes. Neural networks, however, can represent much more complex relationships than these. c. Discrete functions Discrete functions take on only specific values at each input point, without any intermediate values in between. While neural networks do produce discrete outputs (e.g., 0 or 1), their inputs are often continuous and can span a wide range of values. d. Exponential functions Exponential functions involve repeated multiplication of the base value by itself for each power level. While some activation functions, like tanh, have exponential components, neural networks as a whole do not consist entirely of exponential functions. e. Composite functions Composite functions are built from combinations of simpler functions. While neural networks can be seen as composite functions (using multiple layers and neurons), the term "composite" is too broad and does not specifically capture the non-linear nature of neural networks. Now, let's examine the four options: a. Linear functions This option is incorrect because neural networks are capable of learning complex, non-linear relationships. c. Discrete functions Similarly, this option is not correct as it only accounts for one aspect of neural network behavior (discrete outputs).

[Σελίδα 12] d. Exponential functions While some activation functions involve exponential components, the entire class of neural networks does not consist solely of exponential functions. e. Composite functions This option is too broad and does not specifically capture the non-linear nature of neural networks. b. Non-linear functions As we've discussed, this option correctly identifies the fundamental property of neural networks: they can represent complex relationships that are inherently non-linear in nature.

Ερώτηση 22

The correct answer is: c. 2f(x)(1-f(x)) and 0.50 Here's why: Let's first find the derivative of the sigmoid function f(x) = 1/(1+e^-x): Using the chain rule, we get: f'(x) = d/dx [1/(1+e^-x)] = -e^(-x) / (1 + e^(-x))^2 Simplifying this expression, we get: f'(x) = 2e^(-x) / (1 + e^(-x))^2 Now, let's find the maximum slope of the sigmoid function. This occurs when f'(x) is greater than zero. Taking the logarithm base e on both sides and simplifying, we get:

[Σελίδα 13] x > -1 So, the maximum slope occurs at x = -1. Let's calculate the value of the derivative and the maximum slope at this point: f(x) = 1/(1+e^(-1)) ≈ 0.63 f'(x) = 2e^(-x) / (1 + e^(-x))^2 ≈ 0.27 * 2 ≈ 0.50 Note that the maximum slope is approximately 0.50, not 0.25 or 0.75. Now, let's examine why the other options are incorrect: a. f(x) and 1 The derivative of the sigmoid function is not simply f(x), but rather a complex expression involving e^(-x). b. 1-f(x) and 0.75 This option incorrectly calculates both the derivative and the maximum slope. d. f(x)(1-f(x)) and 0.25 This option incorrectly calculates both the derivative and the maximum slope, and also introduces an additional factor (f(x)(1-f(x))) that is not present in the actual derivative of the sigmoid function.

Ερώτηση 23

The correct answer is: c. 2 Here's why:

[Σελίδα 14] Let's recall the logistic activation function: f(x) = 1 / (1 + e^(-x)). The neuron's output is given by the weighted sum of its inputs plus the bias, passed through the logistic activation function: y = f(w1x1 + w2x2 + b) Given that y = 0.5, x1 = 4, x2 = 2, and w1 = 1, w2 = -1, we can plug in these values to get: 0.5 = f(41 + 2(-1) + b) = f(4 - 2 + b) = f(2 + b) Now, we need to find the value of b that satisfies this equation. Since the output is 0.5, which is greater than 0.25 (the midpoint of the logistic function), we know that the input must be positive: 2 + b > ln(4/3) = 1.26 To satisfy this inequality, we need to find a value for b such that: b > -2 This means that b = -2 would be too negative, and thus would not give an output of 0.5. Now, let's examine why the other options are incorrect: a. 0 If the bias were 0, the input to the logistic function would be simply the weighted sum of x1 and x2, which is 4 - 2 = 2. But this gives an output of f(2) ≈ 0.88, not 0.5. b. -2 As we saw above, if the bias were -2, it would be too negative to give an output of 0.5. d. -1 If the bias were -1, the input to the logistic function would be simply the weighted sum of x1 and x2 plus b, which is 4 - 2 + (-1) = 1. This gives an output of f(1) ≈ 0.73, not 0.5. Therefore, the bias must be greater than -2, so that we get an output of 0.5 from the neuron. The minimum

[Σελίδα 15] possible value for b is therefore b = 2.

Ερώτηση 24

The correct answer is: d. Perceptron training with error correction always terminates if the learning rate is small. Here's why: Perceptron training is a type of supervised learning algorithm that uses a single layer neural network to classify inputs into one of two classes (0 or 1). The algorithm iteratively updates the weights and bias of the neuron based on the error between the predicted output and the true label. The Perceptron Convergence Theorem states that if the learning rate is small enough, the algorithm will always converge to a solution in finite time. This means that no matter how complex the problem or how many iterations are performed, the training process will eventually terminate with an accurate model. Now, let's examine why the other options are incorrect: a. The bias of a neuron is the weight of a connection with an input equal to -1. This statement is actually false! In most neural network implementations, including perceptron algorithms, the bias is simply an additional term that shifts the activation function (e.g., sigmoid, ReLU) by a certain value. It's not necessarily related to any specific input weight. b. XOR is a linearly separable classification problem. Actually, XOR (Exclusive OR) is an example of a non-linearly separable classification problem! This means that there is no single hyperplane (or line in the case of 2D inputs) that can separate the two classes. In other words, it's impossible to find a set of weights and bias that can accurately classify all XOR examples using linear models. c. Training a neuron by minimizing the training error always terminates if the learning rate is small.

[Σελίδα 16] This statement is actually false! While it might seem reasonable, minimization of training error does not guarantee termination in finite time for most optimization algorithms used in machine learning (including neural networks). In fact, convergence to an optimal solution can be non-trivial and sometimes impossible. Therefore, the correct answer is d, which highlights a key property of Perceptron training that ensures convergence under certain conditions.

Ερώτηση 25

The correct answer is: d. 8 Here's why: The given binary strings are: * 01011011 * 00110110 To determine the number of patterns, we can convert these binary numbers into decimal equivalents and see how many unique values we get. Let's convert them to decimal: * 01011011 = (0 × 2^7) + (1 × 2^6) + (0 × 2^5) + (1 × 2^4) + (1 × 2^3) + (0 × 2^2) + (1 × 2^1) + (1 × 2^0) = 0 + 64 + 0 + 16 + 8 + 0 + 2 + 1 = 91 * 00110110 = (0 × 2^7) + (0 × 2^6) + (1 × 2^5) + (1 × 2^4) + (0 × 2^3) + (1 × 2^2) + (1 × 2^1) + (0 × 2^0) = 0 + 0 + 32 + 16 + 0 + 4 + 2 + 0 = 54 Now, let's see how many unique decimal values we get from these binary strings:

[Σελίδα 17] * We can have any combination of the 8 bits (0s and 1s) in either string. * This means that each bit can be set to one of two possible values: 0 or 1. * Since there are 8 bits, the total number of different patterns is 2^8 = 256. However, we're interested in unique decimal values, not all possible binary combinations. Let's look at our original decimal equivalents (91 and 54) and see how many unique decimal numbers they could possibly represent: * The minimum value for a decimal equivalent is 0 (when all bits are set to 0). * The maximum value for a decimal equivalent is 255 (when all bits are set to 1). Since we're interested in the number of possible decimal values that can be represented by these binary strings, let's count them: * 0-54: 55 unique decimal numbers * 55-91: 37 unique decimal numbers In total, there are 55 + 37 = 92 unique decimal numbers. However, we should note that this includes the possibility of negative numbers (which don't exist in binary strings). Since the smallest decimal number is 0 and the largest decimal number is 255, the number of unique patterns (both positive and negative) is indeed 8. Therefore, the correct answer is d, which represents the total number of different patterns that can be represented by these two binary strings.

Let's re-examine the problem: We have two binary strings: * 01011011 * 00110110 Notice that these strings are identical when reversed and complemented (i.e., when we flip each bit). In other words, the first string is equivalent to the second string modulo reversal and complementation. When we reverse the first string, we get: 11001101 And when we reverse the second string, we get: 10111000 However, neither of these reversed strings match the original strings. But notice that if we complement each bit in the first reversed string (i.e., flip each 0 to a 1 and vice versa), we get: 11001100

[Σελίδα 18] Which is identical to the second reversed string (modulo reversal). This means that we can transform one string into another through a sequence of reversible operations (reversal and complementation). Therefore, these two strings belong to the same pattern. So, indeed, the correct answer is b. 2, which represents the number of different patterns that the given binary strings belong to!

Ερώτηση 26

The correct answer is: d. 22 Here's why: We're using a genetic algorithm with binary chromosome encoding to find the values of two real variables x and y that maximize a complex mathematical function f(x, y). The domain of the variables is the interval [-1, 1], which means we need to represent all possible values within this range. Since the goal is to determine the values of x and y with an accuracy of 3 decimal places, let's first find the total number of possible values for a single variable x in this range: * The minimum value is -1 (represented as 11111111111... in binary) * The maximum value is 1 (also represented as 11111111111...) * Since there are 10 possible values (0.001, 0.01, ..., 1.000), we can represent a single variable x with 4 decimal places using 12 bits (since 2^12 = 4096 > 10^4) However, since the domain is [-1, 1] and we want to determine the values of both x and y with an accuracy of 3 decimal places, we need to double the number of bits required for a single variable. This gives us:

[Σελίδα 19] * 2 variables × (12 bits / variable) = 24 bits However, this is not correct because it's not accounting for the binary representation of the negative values. To correctly calculate the minimum number of bits needed, let's find the smallest positive value in the interval [-1, 1] that can be represented with 11 bits: * The largest possible integer less than or equal to -1 (represented as a negative binary number) is -256 * The next larger positive integer is 257 Since we're using binary representation for both positive and negative values, let's find the correct number of bits needed to represent all possible values in the interval [-1, 1]: We can fit 2^11 = 2048 distinct numbers within this range. However, since the goal is to determine the values of x and y with an accuracy of 3 decimal places (and we're representing both positive and negative values), let's add a few more bits: * The smallest possible value that can be represented using 22 bits is -2^21 = -2097152 * And the largest possible value that can be represented using 22 bits is 2^21 + 1/8 (which can be approximated to 2.000...001, since we're dealing with binary representation). With this range and an accuracy of 3 decimal places, we should have enough resolution in the values of x and y. Therefore, the correct answer is d. 22, which represents the minimum number of bits required for the chromosome to determine the values of x and y with an accuracy of 3 decimal places!

Ερώτηση 27

The correct answer is: a. ... smaller its probability of survival after crossover.

[Σελίδα 20] Here's why: In a genetic algorithm, the order of a schema refers to its complexity or structure. A higher-order schema has more complex interactions between genes, making it harder for the algorithm to maintain. When crossover occurs (i.e., two parents exchange some information), the chance that the resulting offspring will inherit a combination of genes from both parents is decreased if the schema's order is high. This means that a larger order schema will be less likely to survive after crossover because its components are more prone to disruption or loss during the process. To illustrate this, consider the following example: Let's say we have two binary strings (schemas): * A 3-bit string: 101 * A 6-bit string: ABC101 The 6-bit string has a higher order than the 3-bit string because it contains more complex information. When these strings undergo crossover, the resulting offspring will be more likely to inherit just one of the original strings (either the 3-bit or the 6-bit), rather than inheriting both. This is because the interactions between genes in the higher-order schema are harder to maintain during crossover. As a result, schemas with higher order values have a smaller probability of survival after crossover, making option a the correct answer. The other options can be eliminated as follows: * Option b: The larger the order of a schema, the less likely it is that both parents will contribute equally in the offspring. However, this statement does not necessarily hold true for all genetic algorithms. * Option c and d: These statements are specific to mutation, which introduces random changes to genes. While it's true that higher-order schemas may be more sensitive to mutation, the relationship between order and survival probability is still weaker than with crossover.

Ερώτηση 28

The correct answer is: a. 0 Here's why: In this genetic algorithm, the evaluation function is equal to |N1-N0|, where N1 and N0 are the number of 1s and 0s in the chromosome, respectively. Since we have a binary chromosome encoding of 32 bits, the maximum possible value for both N1 and N0 is 16 (half of 32). However, to achieve optimal performance, the evaluation function requires |N1-N0| = 0. This means that the number of 1s must be equal to the number of 0s. Since each bit can only take on a value of either 0 or 1, and we have a total of 32 bits, it is not possible for both N1 and N0 to simultaneously reach their maximum values. In other words, it's impossible to create an individual with |N1-N0| = 0 using this evaluation function. Therefore, when constructing an initial population of 1000 individuals randomly, we do not expect any individuals with optimal performance (i.e., |N1-N0| = 0) to be present in the population. This means that option a is the correct answer. The other options can be eliminated as follows: * Option b: The probability of generating an individual with exactly half 1s and half 0s out of a random initial population is extremely low, making it unlikely that we would find even a single such individual. * Options c and d: These options assume a non-zero probability of finding individuals with optimal performance. However, since it's impossible to satisfy the condition |N1-N0| = 0 using this evaluation function, these options are also incorrect.

Ερώτηση 29

The correct answer is: d. When it has a large order and large definitive length. Here's why: A schema that matches 50% of the individuals in the initial generation means that its presence is very strong in the population. In this genetic algorithm, schemas can be affected by two types of operations: mutation and crossover. * Mutation changes individual genes at random. * Crossover combines two parent individuals to produce an offspring. When a schema has a large order and large definitive length, it is more likely to be disrupted or destroyed during these operations. Here's why: * A high-order schema has many complex interactions between its components, making it harder for the algorithm to maintain them across multiple generations. * A long definitive length means that the schema spans a larger number of genes, increasing the likelihood of disruption during mutation and crossover. As a result, when this schema undergoes mutation or crossover, there is a higher chance that some of its components will be lost or changed, disrupting its presence in the population. In contrast, schemas with smaller order and length values are less affected by these operations, making it more likely for them to persist across multiple generations. This means that option d is the correct answer, as the large order and length make it more vulnerable to disruption and disappearance from the population over time. The other options can be eliminated as follows: * Option a: A small order and length actually help schemas resist disruption, making it less likely for them to disappear. * Options b and c: While having a large order and short length might seem like an advantage, it doesn't necessarily mean that the schema will disappear faster. In fact, having a shorter length means there are fewer genes to disrupt, making it slightly more resilient.

Ερώτηση 30

The correct answer is: a. Finding the optimal robot path for moving from an initial to a final position. Here's why: A constraint satisfaction problem (CSP) is a type of optimization problem where the goal is to find a solution that satisfies a set of constraints. In CSPs, there are usually several variables, and each variable has a set of possible values associated with it. There may also be relationships between the variables, represented as constraints. A CSP can be thought of as trying to assign a value to each variable in such a way that all the constraints are satisfied simultaneously. Now, let's examine each option: * Option b: Creating a school timetable is indeed a CSP. Imagine you have students with different classes, teachers with different periods, and rooms available for teaching. You need to schedule classes without conflicts (e.g., no teacher has multiple classes at the same time). * Option c: Determining shifts for the nursing staff in a hospital is also a CSP. There are various constraints like ensuring adequate coverage during peak hours, assigning compatible nurses for specific tasks, and so on. * Option d: Solving a Sudoku puzzle is another example of a CSP. The goal is to fill a 9x9 grid with numbers from 1 to 9 such that each row, column, and 3x3 sub-grid contains the numbers without repetition. However, option a, finding the optimal robot path for moving from an initial to a final position, doesn't fit into the CSP category. This is because it's primarily a search problem where you're looking for the shortest or most efficient path between two points. The constraints in this case are mainly related to movement and collision avoidance rather than satisfying multiple conditions simultaneously. In summary, while options b, c, and d are all constraint satisfaction problems, option a is not. The other options can be eliminated as follows:

[Σελίδα 24] * Options b, c, and d: These examples fit the definition of a CSP, so they're not correct. * Option e: There is no option e.

Ερώτηση 31

The correct answer is: d. Variable unification Here's why: Variable unification is a concept from logic programming and artificial intelligence, but it's not directly related to constraint satisfaction problem (CSP) solving methods. In logic programming, variable unification refers to the process of finding a substitution for variables that makes two expressions or terms equal. This is often used in reasoning about knowledge representation and deduction. However, CSPs are primarily concerned with finding solutions that satisfy constraints on a set of variables. The main goal is to find an assignment of values to variables such that all constraints are satisfied simultaneously. Now, let's examine each option: * Option a: Node consistency is a property of CSPs where each node (or variable) has a consistent and valid value assigned to it, taking into account the constraints. * Option b: Arc consistency is another important concept in CSPs. It ensures that for every possible assignment of values to variables, there exists a valid assignment for all its neighbors. * Option c: Forward checking is a constraint satisfaction algorithm used to prune branches in search trees during CSP solving. It works by evaluating the constraints one at a time, starting from an empty set of assignments. In contrast, variable unification (option d) is not directly related to CSPs or their solving methods. While it's

[Σελίδα 25] possible that some techniques from logic programming might be applied to certain types of constraint satisfaction problems, variable unification itself is more general and doesn't fit the specific context of CSP solving methods. The other options can be eliminated as follows: * Options a, b, and c: These are all related to constraint satisfaction problem solving methods, so they're not correct. * Option e: There is no option e.

Ερώτηση 39

In Prolog, the empty list is represented by []. This is a common convention used throughout many Prolog implementations and systems. So, to answer your question directly: The empty list in Prolog is represented by [].

Ερώτηση 40

Let's analyze the given Prolog query and determine the correct answer. The query is: ?- append([a,b], L, [a,c,b,a,b]). The append predicate in Prolog is used to concatenate two lists into a third list. The syntax of append/3 is:

append(Xs, Ys, Zs) :- last(Zs, Ys), append(Xs, Ys, Xs).
In this query, [a,b] and L are the two lists to be concatenated. The resulting list should be [a,c,b,a,b]. To solve this problem, we can try different possibilities for the value of L. Let's start by considering the first option: (a) L = [a,c,b]. If L is equal to [a,c,b], then when we append [a,b] to L, we should get [a,a,c,b,b], not [a,c,b,a,b]. Therefore, option (a) is incorrect. Next, let's consider option (b) L = [c,a,b]. If this is the case, then when we append [a,b] to L, we get [a,c,a,b,b], which is also not equal to [a,c,b,a,b]. Thus, option (b) is incorrect as well. Let's now consider option (c) L = [c,b,a]. If this is the case, then when we append [a,b] to L, we get [a,c,b,a,b], which matches the desired output. Finally, let's examine option (d) false. This means that there are no possible solutions for L. However, since we have found a solution (L = [c,b,a]) in step 3 of our manual analysis, this option is also incorrect. Therefore, based on the given query and our detailed analysis, the correct answer is: (c) L = [c,b,a].

Ερώτηση 41

Let's analyze each option to determine which one could have [a,b] as the only answer. Option (a): ?- member(L, [a,b]). The member/2 predicate in Prolog is used to check if an element is present in a list. The syntax of member/2 is:

member(X, L) :- append(_, [X], L).
In this query, [a,b] is the list, and we're asking which elements are members of it. The only possible value for L that satisfies the condition is indeed [a,b]. However, since member/2 can also match individual elements (e.g., member(a, [a,b])), this option does not guarantee that [a,b] will be the only answer. Option (b): ?- member(L, [[a,b],a,b]). In this query, we have a nested list structure: [[a,b],a,b]. The outermost list contains two elements: another list ([a,b]) and an individual element (a,b). When we ask for the members of this list using member/2, we're essentially asking which sublists or individual elements are part of it. Since [a,b] is one of the elements in this nested list, it will be matched by the member/2 predicate. However, since there's another element ([a,b]) that matches as well (i.e., a sublist containing [a,b]), this option does not guarantee that [a,b] will be the only answer. Option (c): ?- member(L, [[a,b]]). In this query, we have a nested list structure: [[a,b]]. The outermost list contains one element, which is another list containing [a,b]. When we ask for the members of this list using member/2, we're essentially asking which sublists or individual elements are part of it. Since the only element in this list is a sublist containing [a,b], the member/2 predicate will match this sublist. Therefore, this option guarantees that [a,b] will be the only answer. Option (d): ?- member(L, [[a], [b]]). In this query, we have a nested list structure: [[a], [b]]. The outermost list contains two elements: individual lists ([a] and [b]).

[Σελίδα 38] When we ask for the members of this list using member/2, we're essentially asking which sublists or individual elements are part of it. Since there's no element directly containing [a,b], but rather individual elements, this option does not guarantee that [a,b] will be the only answer. Therefore, based on our analysis, the correct answers are: (c) ?- member(L, [[a,b]]).

Ερώτηση 42

Let's analyze each option to determine the correct answer. Option (a): Nodes represent constraints and edges variables. In a constraint graph, nodes typically represent variables, while edges between nodes represent the constraints that relate these variables. This representation allows for easy visualization of the relationships between variables and the constraints that govern them. For example, in a scheduling problem, nodes might represent tasks (e.g., "Task A" and "Task B"), and edges between nodes would indicate the constraints between these tasks, such as "Task A must finish before Task B starts." This option does not accurately describe the representation of nodes and edges in a constraint graph. Option (b): Nodes represent variables and edges constraints. As mentioned earlier, this is the correct interpretation of a constraint graph: nodes represent variables, while edges between nodes represent constraints that relate these variables. For instance, in a scheduling problem, nodes might represent tasks (e.g., "Task A" and "Task B"), and edges between nodes would indicate the constraints between these tasks, such as "Task A must finish before Task B starts." This option accurately describes the representation of nodes and edges in a constraint graph.

[Σελίδα 39] Option (c): Nodes represent value domains and edges variables. In this interpretation, nodes would represent the set of possible values that each variable can take on (its domain), while edges between nodes would represent the relationships between variables. While not entirely incorrect, this option is less common in constraint graph representations than the one described in Option (b). Option (d): Edges are always unidirectional. In a typical constraint graph representation, edges can be either bidirectional or unidirectional, depending on the specific requirements of the problem. Bidirectional edges indicate that both constraints and variables have relationships with each other, while unidirectional edges suggest that one side has more influence or control over the relationship. This option is not universally true for all constraint graphs. Therefore, based on our analysis, the correct answer is: (b) Nodes represent variables and edges constraints.

Ερώτηση 43

Let's analyze each option to determine the best correct proposal. Option (a): Define NXN variables with a domain for each one D. In this proposal, variables are defined for each cell in the grid, and the domain of these variables is the set of words D. This means that for each cell, we're considering all possible words from the list D as potential solutions.

[Σελίδα 40] While this approach does represent the problem as a constraint satisfaction problem (CSP), it's not the most efficient or practical way to model a crossword puzzle. By considering every word in the domain for each cell, we're introducing unnecessary complexity and constraints that may not be necessary for solving the puzzle. Option (b): Define M variables with a domain for each one D. In this proposal, variables are defined only for the M word-places, and the domain of these variables is the set of words D. This means that we're considering all possible words from the list D as potential solutions for the specific word-places. While this approach simplifies the problem representation compared to Option (a), it still doesn't take into account the specific constraints imposed by the grid structure. By not considering the spatial relationships between the word-places, we may miss important constraints that can help solve the puzzle more efficiently. Option (c): Define M variables with a domain for each one the subset of D with words of the same length as the word-place it represents. In this proposal, variables are defined only for the M word-places, and the domain of these variables is restricted to the subset of words from D that have the same length as the corresponding word-place. This approach takes into account the spatial relationships between the word-places and introduces a constraint that ensures each word must fit exactly in its allocated space. By doing so, it significantly reduces the search space and makes the problem more tractable. Option (d): Define N variables with a domain for each one D. In this proposal, variables are defined for each row/column in the grid, and the domain of these variables is the set of words D. This means that we're considering all possible words from the list D as potential solutions for the entire row or column. While this approach does model some spatial relationships between the word-places, it's not the most efficient way to represent a crossword puzzle problem. By defining variables at the wrong level of granularity, we may introduce unnecessary complexity and constraints that can make the problem harder to solve. Therefore, based on our analysis, the best correct proposal is: (c) Define M variables with a domain for each one the subset of D with words of the same length as the word-place it represents.

Ερώτηση 45

Let's analyze each option to determine the correct representation. Option (a): All students who have a car, have a merchant father. This interpretation suggests that students who possess a car must have a merchant as their father. However, this statement does not logically follow from the given proposition. The proposition states "!Student(x) or !Car(y) or !Owns(y,x) or (Father(z,x) ⇒ Merchant(z))", which implies that if someone is the parent of x and is a merchant, then they are either not a student or do not have a car, but it does not specify that students with cars must have a merchant as their father. Option (b): All those who are not students or do not have a car, have a merchant father. This interpretation suggests that anyone who is not a student or does not own a car has a merchant as their parent, which is not what the proposition represents. The proposition specifically states "!Owns(y,x)", which means y (the owner) owns x, and there is no indication that the parent of x must be a merchant. Option (c): If a father of someone is a merchant, then he is not a student or does not have a car. This interpretation suggests that if someone's father is a merchant, then their father cannot be a student or own a car. This matches the structure of the given proposition: "∀x∀y∀z (!Student(x) or !Car(y) or !Owns(y,x) or (Father(z,x) ⇒ Merchant(z)))". The implication is that if someone's parent is z, and z is also a merchant, then it must be the case that their father is not a student. Option (d): If a father of someone is a merchant, then he is not a student and has a car. This interpretation suggests that if someone's father is a merchant, then their father cannot be a student, but they must have a car. This does not align with the given proposition, which states "!Owns(y,x)" without specifying the relationship between y (the owner) and x. Therefore, based on our analysis, the correct representation of the proposition is: (c) If a father of someone is a merchant, then he is not a student or does not have a car.

Ερώτηση 49

To answer this question, we'll analyze both methods described and determine which one infers G in fewer steps.

Method (a): Forward Chaining with First Candidate Rule Firing Order

Given the initial content of the working memory ME = {A, B, D, E}, let's apply forward chaining by firing the first candidate rule encountered: 1. Rule R1 is fired because it matches A and B in the working memory. 2. After applying Rule R1, we get {C} as part of the working memory. 3. Next, Rule R5 would be considered next but it's not applicable here since C is present. 4. However, Rule R2 is fired because it matches C and D in the working memory. 5. After applying Rule R2, we get {E} as part of the working memory. 6. Now we see that E is already present in the working memory. At this point, we've applied two rules (R1 and R2), but there's no immediate application for other rules since C and D are used in further rule applications but aren't necessary now given the current state. However, considering the remaining set of rules: - Rule R4 could be considered next because it matches A and -D. However, we don't have -D. - Rules R3, R6, R7, and R8 require E to be present in addition to other conditions which are already satisfied by some rule applications.

[Σελίδα 35] Upon closer inspection, method (a) would actually lead us to infer G through a combination of rules without directly considering all possible paths due to the control strategy. The presence of -H is not required for inferring G using R7 and E's presence.

Method (b): Forward Chaining with Recency and Order of Writing

For method (b), we consider the recency of rule applications: - Rules are applied based on their recency, not necessarily in the order they appear. - This method may allow for more efficient path consideration but requires analyzing potential paths in reverse order due to the recency strategy. Given this complexity and considering the ruleset, it becomes apparent that both methods might actually lead to similar steps or paths being considered when aiming to infer G. The decision depends on how each rule is evaluated based on its conditions' availability. However, upon reevaluation for clarity: - Rules R4 and R5, while not directly leading to inferring G through their immediate conditions (since A and B are already satisfied), hint at potential paths involving the presence of E which leads to considering other rules like R7 or R8. Considering these steps in a more detailed analysis, both methods would indeed lead to similar pathways being considered for inferring G. The correct approach depends on how each method handles rule applicability and condition satisfaction, making (c) the most accurate choice given the description and potential misinterpretation of method-specific efficiencies.

Conclusion:

  • (a) Assuming direct applicability without detailed step-by-step analysis might have initially suggested a preference for one strategy over another based on forward chaining alone.
  • (b) Upon reconsidering both methods, recognizing that the efficiency of inferring G depends on how each rule is evaluated and applied suggests that both approaches might lead to similar outcomes. The correct answer, therefore, considering detailed steps and potential pathways, is: (c) They will do the same steps because all rules have the same number of conditions.

✔ Επιβεβαίωσε · ✖ Βρήκα λάθος


✖ Βρήκα λάθος στη μεταγραφή