מכינה למתמטיקה קיץ תשעב/תרגילים/7/פתרון 7

מתוך Math-Wiki

1[עריכה]

נגדיר את האטומים הבאים:

p - ערן שמח

q - ערן ישן

r - השמש זורחת


הצרן את המשפטים הבאים (כלומר, כתוב אותם בעזרת הפסוקים והקשרים הלוגיים שלמדנו- 'או', 'וגם', 'גרירה', 'שלילה')

  • כאשר השמש זורחת, ערן מתעורר
    • [math]\displaystyle{ r \rightarrow \neg q }[/math]
  • ערן שמח רק כאשר השמש זורחת
    • [math]\displaystyle{ p \rightarrow r }[/math]
  • אם ערן שמח וער, סימן שהשמש זורחת
    • [math]\displaystyle{ (p \and \neg q) \rightarrow r }[/math]
  • במפתיע, ערן תמיד עצוב כשהוא ער
    • [math]\displaystyle{ \neg q \rightarrow \neg p }[/math]
    • שקול: [math]\displaystyle{ p \rightarrow q }[/math]
  • אם השמש זורחת, כאשר ערן אינו ישן הוא שמח
    • [math]\displaystyle{ r \rightarrow (\neg q \rightarrow p) }[/math]
  • לא ייתכן שערן ישן והשמש אינה זורחת
    • [math]\displaystyle{ q \rightarrow r }[/math]

2[עריכה]

נגדיר את ההגדרות הבאות:

  • מספר נקרא טרינרי אם הוא מתחלק ב-3
  • זוג מספרים נקרא זוג הודי אם סכומם הוא טרינרי
  • זוג מספרים נקרא צמוד היטב אם הוא הודי וגם אחד מבין המספרים אינו טרינרי


נסמן את הפרדיקט:

[math]\displaystyle{ p(x) }[/math] - המספר x מתחלק בשלוש

לדוגמא, [math]\displaystyle{ p(6)=T,p(7)=F }[/math]


הצרן את הפסוקים הבאים תוך שימוש בפרדיקט p:

דוגמא: המספרים a,b הם טרינריים - [math]\displaystyle{ p(a)\and p(b) }[/math]


  • זוג המספרים a,b הוא הודי.
    • [math]\displaystyle{ p(a+b) }[/math]


  • זוג המספרים a,b צמוד היטב.
    • [math]\displaystyle{ p(a+b) \and (\neg p(a) \or \neg p(b)) }[/math]


  • אם זוג המספרים a,b צמוד היטב, אזי a אינו טרינרי וגם b אינו טרינרי
    • [math]\displaystyle{ (p(a+b) \and (\neg p(a) \or \neg p(b))) \rightarrow (\neg p(a) \and \neg p(b)) }[/math]


  • אם זוג המספרים a,b צמוד היטב והמספר c הוא טרינרי אזי זוג המספרים a,c אינו הודי
    • [math]\displaystyle{ (p(a+b) \and (\neg p(a) \or \neg p(b)) \and p(c)) \rightarrow \neg p(a+c) }[/math]


  • לכל מספר a, לפחות אחד מבין המספרים [math]\displaystyle{ a+1,a+2,a+3 }[/math] הוא טרינרי
    • [math]\displaystyle{ p(a+1) \or p(a+2) \or p(a+3) }[/math]


  • לכל מספר a, בדיוק אחד מבין המספרים [math]\displaystyle{ a+1,a+2,a+3 }[/math] הוא טרינרי
    • [math]\displaystyle{ [p(a+1) \and \neg p(a+2) \and \neg p(a+3)] \or [\neg p(a+1) \and p(a+2) \and \neg p(a+3)] \or [\neg p(a+1) \and \neg p(a+2) \and p(a+3)] }[/math]


  • המספר a אינו טרינרי
    • [math]\displaystyle{ \neg p(a) }[/math]


  • זוג המספרים a,b אינו הודי
    • [math]\displaystyle{ \neg p(a+b) }[/math]


  • זוג המספרים a,b אינו צמוד היטב
    • [math]\displaystyle{ \neg p(a+b) \or (p(a) \and p(b)) }[/math]