0% found this document useful (0 votes)
1 views1 page

Homework 1

The document outlines the homework assignment for the Discrete Mathematics course at Alanya Alaaddin Keykubat University for the Spring 2024-2025 semester. It includes tasks such as checking logical equivalence using truth tables and programming, as well as coding specific discrete mathematics problems based on the last digit of the student's number. The problems range from prime number generation to generating truth tables and analyzing logical expressions.

Uploaded by

kadirgonullu8925
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Homework 1

The document outlines the homework assignment for the Discrete Mathematics course at Alanya Alaaddin Keykubat University for the Spring 2024-2025 semester. It includes tasks such as checking logical equivalence using truth tables and programming, as well as coding specific discrete mathematics problems based on the last digit of the student's number. The problems range from prime number generation to generating truth tables and analyzing logical expressions.

Uploaded by

kadirgonullu8925
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ALANYA ALAADDİN KEYKUBAT UNIVERSITY

DEPARTMENT OF COMPUTER ENGINEERING


2024-2025 SPRING SEMESTER DISCRETE MATHEMATICS
HOMEWORK-1

Student Number: Name-Surname:


1. Check whether ((p → q) → (r →s)) and ((p→r) → (q→s)) are logically equivalent
• Using truth table
• Implementing in any programming language

2. In the following table, there are some example problems of discrete mathematics concepts where
it can be implemented. Depending on the last digit of your student number, write the code of the
example problem in any programming language. Note: For example; your student number is
130204041. It means that you will write the code of the problem 1- Matrix Operations

0 Prime Number Generation: Write a function to generate prime numbers up to a given limit.
Matrix Operations: Implement functions for matrix addition, subtraction, multiplication,
1
and transpose.
2 Generating Subsets: Write a function to generate all possible subsets of a set.
Pascal’s Triangle: Write a function to generate Pascal’s triangle up to a specified number of
3
rows.
Reflexivity, Symmetry, and Transitivity: Write a function that returns reflexivity,
4
symmetry, and transitivity of the relation.
Set Operations: Write functions to perform set operations such as union, intersection,
5
difference, and complement on sets of integers or strings.
Modular Exponentiation: Write a function to find the result for a given base, exponent, and
6
modulus.
7 Combinatorics: Write a function to calculate permutations of a string using recursion.
8 Truth Table in Logic: Write a function to generate truth tables for a given logical expression.
Tautology and Contradiction: Write a function to find the given logical expression is
9
tautology, contradiction, or neither.

You might also like