Oʻzbekiston respublikasi oliy ta’lim, fan va innovatsiyalar vazirligi


Download 109.62 Kb.
bet4/4
Sana13.05.2023
Hajmi109.62 Kb.
#1456031
1   2   3   4
Bog'liq
Eyler funksiyasi

TEOREMA. Agar (𝑎, 𝑚) = 1 bo`lsa, u holda 𝑎𝑥 ≡ 𝑏(𝑚𝑜𝑑𝑚) taqqoslamaning yechimi 𝑥 ≡ 𝑏𝑎𝜑(𝑚)−1(𝑚𝑜𝑑𝑚) bo`ladi.
ISBOTI. (𝑎, 𝑚) = 1 bo`lgani uchun Eyler teoremasiga ko`ra 𝑎𝜑(𝑚)
1(𝑚𝑜𝑑𝑚). Bundan
𝑎𝜑(𝑚) ∙ 𝑏 = 𝑏(𝑚𝑜𝑑𝑚)
𝑎 ∙ 𝑎𝜑(𝑚)−1 ∙ 𝑏 = 𝑏(𝑚𝑜𝑑𝑚) (3)
Demak, (1) ∧ (3) ni solishtirsak, 𝑥 = 𝑎𝜑(𝑚)−1 ∙ 𝑏(𝑚𝑜𝑑𝑚) yechimi ekani ko`rinadi.
Misol. 5𝑥 ≡ 3(𝑚𝑜𝑑6)
(5,6) = 1 bo`lgani uchun 𝑥 = 3 ∙ 5𝜑(6)−1(𝑚𝑜𝑑𝑚) ≡ 3 ∙ 5(𝑚𝑜𝑑𝑚) ≡ 15 ≡
3(𝑚𝑜𝑑𝑚).
Sinash usuli. Bu usulning mohiyati shundaki (1) taqqoslamadagi 𝑥 o`rniga 𝑚 modulga ko`ra chegirmalarning to`la sistemasidagi barcha chegirmalar ketma-ket qo`yib chiqiladi. Ulardan qaysi biri (1) ni to`g`ri taqqoslamaga aylantirsa, o`cha chegirma qatnashgan sinf yechim hisoblanadi. Lekin koeffitsient yetarlicha katta bo`lganda bu usul qulay emas.
Koeffitsientlarni o`zgartirish usuli. Taqqoslamalarning xossalaridan foydalanib, (1) da no’ma`lum oldidagi koeffitsientni va b ni shunday o`zgartirish kerakki, natijada taqqoslamaning o`ng tomonida hosil bo`lgan son 𝑎𝑥 hadning koeffitsientiga bo`linsin.
MISOL. 1. 7𝑥 ≡ 5(𝑚𝑜𝑑9)
7𝑥 ≡ 5 + 9(𝑚𝑜𝑑9)
7𝑥 ≡ 14(𝑚𝑜𝑑9)
𝑥 ≡ 2(𝑚𝑜𝑑9)
2. 17𝑥 ≡ 25(𝑚𝑜𝑑28)
17𝑥 + 28𝑥 ≡ 25(𝑚𝑜𝑑28)
45𝑥 ≡ 25(𝑚𝑜𝑑28)
9𝑥 ≡ 5(𝑚𝑜𝑑28)
9𝑥 ≡ 5 − 140(𝑚𝑜𝑑28)
9𝑥 ≡ −135(𝑚𝑜𝑑28)
𝑥 ≡ −15(𝑚𝑜𝑑28)
𝑥 ≡ 13(𝑚𝑜𝑑28)
Eyler teoremasidan foydalanish usuli. Ma`lumki, (𝑎, 𝑚) = 1 bo`lsa, u holda 𝑎𝜑(𝑚) ≡ 1 (𝑚𝑜𝑑𝑚) taqqoslama o`rinli edi. Shunga ko`ra, 𝑥 = 𝑎𝜑(𝑚)−1 ∙ 𝑏(𝑚𝑜𝑑𝑚) bo`ladi.
Misol. 3𝑥 ≡ 7(𝑚𝑜𝑑11)
𝑥 ≡ 3𝜑(11)−1 ∙ 7(𝑚𝑜𝑑11) 𝜑(11) = 10
𝑥 ≡ 39 ∙ 7(𝑚𝑜𝑑11) ≡ (33)3 ∙ 7 ≡ 53 ∙ 7 ≡ 4 ∙ 7 ≡
28 ≡ 6(𝑚𝑜𝑑11)
Taqqoslamaning moduli yetarlicha katta bo`lsa, quidagi usul ancha qulaydir.
Eyler funksiyasining C# dasturlash tizimi Console oynasida ko’rinishi

using System;


using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EulerTotientFunction


{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Raqamni kiriting:");
int n = Convert.ToInt32(Console.ReadLine());
int result = n;

for (int i = 2; i <= Math.Sqrt(n); i++)


{
if (n % i == 0)
{
while (n % i == 0)
{
n /= i;
}
result -= result / i;
}
}

if (n > 1)


{
result -= result / n;
}

Console.WriteLine("Euler's Totient Function of {0} is {1}", n, result);


}
}
}

Eyler funksiyasining C# dasturlash tizimi WindowsForms oynasida ko’rinishi

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp17


{
public partial class Form1 : Form
{
double x, y, S;
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != "" && textBox2.Text != "")
{
button1.Enabled = true;
button2.Enabled = true;
}
else
{
button1.Enabled = false;
button2.Enabled = false;
}
}

private void button1_Click(object sender, EventArgs e)


{
try
{
x = Convert.ToDouble(textBox1.Text);
y = Convert.ToDouble(textBox2.Text);
S = Math.Log(Math.Abs(Math.Pow(x + y, 2) + Math.Sqrt(Math.Abs(x) + 2) - (x - (x * y) / (Math.Pow(x, 2) / 2 - 5))), Math.E) + Math.Pow(Math.Cos(x + y), 2) / (Math.Pow(x + y, 1.0 / 3));
richTextBox1.Text = richTextBox1.Text + "x = " + x.ToString() + " y = " +
y.ToString() + "\t\tS = " + S.ToString("F") + "\n";
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Dastur bajarilishida xatolik:");
}
}

private void textBox2_TextChanged(object sender, EventArgs e)


{
if (textBox1.Text != "" && textBox2.Text != "")
{
button1.Enabled = true;
button2.Enabled = true;
}
else
{
button1.Enabled = false;
button2.Enabled = false;
}
}

private void button2_Click(object sender, EventArgs e)


{
richTextBox1.Text = "";
textBox1.Text = "";
textBox2.Text = "";
}

private void richTextBox1_TextChanged(object sender, EventArgs e)


{

}
public Form1()


{
InitializeComponent();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{


}
}
}
Download 109.62 Kb.

Do'stlaringiz bilan baham:
1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling