Metadata-Version: 2.5
Name: Discrete_Veerapat
Version: 0.1.0
Summary: A Python package for Discrete Mathematics calculations, featuring Counting and Number Theory modules.
Project-URL: Homepage, https://github.com/Veerapat2549/Discrete_Veerapat
Project-URL: Documentation, https://github.com/Veerapat2549/Discrete_Veerapat#readme
Project-URL: Repository, https://github.com/Veerapat2549/Discrete_Veerapat.git
Project-URL: Bug Tracker, https://github.com/Veerapat2549/Discrete_Veerapat/issues
Author-email: Veerapat Chotikorn <p0636186013@gmail.com>
License: MIT
License-File: LICENSE
Keywords: counting,discrete-mathematics,number-theory
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Discrete Veerapat

Python Package มาตรฐาน PEP 517/621 สำหรับการคำนวณคณิตศาสตร์ดีสครีต (Discrete Mathematics) รวมโมดูล Counting และ Number Theory

## การใช้งาน

```python
import Discrete_Veerapat as dv

# 1. Counting Module

# แฟกทอเรียล (Factorial)
print(dv.factorial(5))                          # Output: 120

# การเรียงสับเปลี่ยน (Permutation: P(n, k))
print(dv.permutation(5, 2))                     # Output: 20

# การจัดหมู่ (Combination: C(n, k))
print(dv.combination(5, 2))                     # Output: 10

# การกระจายทวินาม (Binomial Expansion)
print(dv.binomial_expansion(3))                 # Output: x^3 + 3x^2y + 3xy^2 + y^3

# Stars and Bars (แจกของ n ชิ้น ให้ k กล่อง โดยคนหนึ่งอาจได้ 0 ชิ้น)
print(dv.stars_and_bars(5, 3))                  # Output: 21

# Stars and Bars (แจกของ n ชิ้น ให้ k กล่อง โดยทุกคนต้องได้อย่างน้อย 1 ชิ้น)
print(dv.stars_and_bars_at_least_one(5, 3))     # Output: 6

# ฟังก์ชัน Floor (ปัดเศษลง)
print(dv.floor_function(3.7))                   # Output: 3

# ฟังก์ชัน Ceiling (ปัดเศษขึ้น)
print(dv.ceiling_function(3.2))                 # Output: 4

# หลักการรวมเข้า-ตัดออก สำหรับ 2 เซต (Inclusion-Exclusion Principle: 2 Sets)
print(dv.inclusion_exclusion_2(10, 15, 3))      # Output: 22

# หลักการรวมเข้า-ตัดออก สำหรับ 3 เซต (Inclusion-Exclusion Principle: 3 Sets)
print(dv.inclusion_exclusion_3(10, 15, 12, 3, 2, 4, 1)) # Output: 29

# หลักการรังนกพิราบ (Pigeonhole Principle)
print(dv.pigeonhole_principle(10, 3))           # Output: At least 1 hole has 4 pigeons


# 2. Number Theory Module

# ตรวจสอบจำนวนคู่ (Even Number)
print(dv.is_even(4))                            # Output: True

# ตรวจสอบจำนวนคี่ (Odd Number)
print(dv.is_odd(7))                             # Output: True

# ตรวจสอบจำนวนเฉพาะ (Prime Number)
print(dv.is_prime(29))                          # Output: True

# ตรวจสอบจำนวนประกอบ (Composite Number)
print(dv.is_composite(10))                      # Output: True

# ขั้นตอนวิธีการหาร (Division Algorithm: a = qb + r)
print(dv.division_algorithm(70, 15))            # Output: 70 = 4(15) + 10

# ตัวหารร่วมมาก (Greatest Common Divisor - GCD)
print(dv.gcd(48, 18))                           # Output: 6

# ตรวจสอบจำนวนเฉพาะร่วม (Relatively Prime)
print(dv.is_relatively_prime(15, 28))           # Output: True

# แสดงขั้นตอนการหา ห.ร.ม. แบบยูคลิด (Euclidean Algorithm Steps)
dv.euclidean_algorithm_steps(2569, 2026)
# Output:
# 2569 = 1(2026) + 543
# 2026 = 3(543) + 397
# 543 = 1(397) + 146
# 397 = 2(146) + 105
# 146 = 1(105) + 41
# 105 = 2(41) + 23
# 41 = 1(23) + 18
# 23 = 1(18) + 5
# 18 = 3(5) + 3
# 5 = 1(3) + 2
# 3 = 1(2) + 1
# 2 = 2(1) + 0