saving . . . saved Lagrange's Theorem Proof how to multiply sqrt(-1) values for subgroup H[1,i] (((GROUP THEORY)))) has been deleted. Lagrange's Theorem Proof how to multiply sqrt(-1) values for subgroup H[1,i] (((GROUP THEORY)))) has been hidden .
Lagrange's Theorem Proof how to multiply sqrt(-1) values for subgroup H[1,i] (((GROUP THEORY))))
Title
Question
PROGRAM FOR H=[1,-1]

clear;
clc;
G=[1,-1,sqrt(-1),-sqrt(-1)];
H=[1,-1]
i=1;
if H(i)*H(i+1)==H(i)|H(i)*H(i+1)==H(i+1) then
if H(i)*H(i)==H(i)|H(i)*H(i)==H(i+1) then
if H(i+1)*H(i+1)==H(i)|H(i+1)*H(i+1)==H(i+1) then
printf("H is closed under multiplication\\n");
else
printf("H is not closed and hence H is not a group");
abort;
end
end
end
if H(i)*H(i)==H(i) & H(i+1)*H(i)==H(i+1) then
e=H(i);
printf("e=%f is an unique identity element \\n",H(i));
else if H(i)*H(i+1)==H(i) & H(i+1)*H(i+1)==H(i+1) then
e=H(i+1);
printf("e=%f is an unique identity element \\n",H(i+1));
else
printf("No identity element exists \\n H is not a group \\n");
abort;
end
end
in1=e/H(i)
in2=e/H(i+1)
if in1==H(i)|in1==H(i+1) then
printf("i=%f is an unique inverse element of %d \\n",in1,H(i));
if in2==H(i)|in2==H(i+1) then
printf("i=%f is an unique inverse element of %d \\n",in2,H(i+1));
else
printf("No inverse element exists \\n H is not a group \\n");
abort
end
end
printf("H satisfies all three axioms under multiplication \\n");
printf("Hence H is a group \\n");
printf("H is a subset of group G implies H is a subgroup of G\\n");
printf("Lagranges theorem : O(H) divides O(G)\\n");
n=length(G);
m=length(H);
printf("Order of G=%d\\n",n);
printf("Order of H=%d\\n",m);
k=n/m;
if modulo(n,m)==0 then
printf("O(G)/O(H)=%d",k);
printf("\\n Hence Lagranges theorem holds\\n");
printf("Hence H is a subgroup of G\\n");
else
printf("%d is not a divisor\\n",k);
printf("\\n Hence Lagranges theorem does not holds\\n");
printf("Hence H is not a subgroup of G\\n");
end


<font size="6">This works </font>
<font size="6">
</font>
<font size="6">but </font>
<font size="6">
</font>
<font size="6">when H=[1,%i] ,[1,-%i] it does not work , it says this</font>
<span style="line-height: 21.4285717010498px;">"H is not closed and hence H is not a group"</span>
<font size="6">
</font>
<font size="6">and the entire program aborts .......can someone please help with this ??????</font>

Scilab General None min None sec 30-08-15, 1:05 p.m. Vidhuantony

Answers:

Hi Vidhuantony,

The condition in line 9 is not satisfied due to which the message is displayed. Re-check the logic of the code and execute.

02-09-15, 3:33 p.m. Lavitha Pereira
I know it is that line ma'am...... I am asking if you can tell me how to do complex number multiplication in scilab ..... As when I do this statement H(i)*H(i+1)==H(i)...... It is becoming false as the value %i*1 is being printed as 0 ..... But H(i)is actually 1. .... Is there a way to multiply complex numbers ?......
02-09-15, 3:43 p.m. Vidhuantony
I know it is that line ma'am...... I am asking if you can tell me how to do complex number multiplication in scilab ..... As when I do this statement H(i)*H(i+1)==H(i)...... It is becoming false as the value %i*1 is being printed as 0 ..... But H(i)is actually 1. .... Is there a way to multiply complex numbers ?......
02-09-15, 3:43 p.m. Vidhuantony

Login to add comment


For both the of H values with %i values, your statement H(i+1)*H(i+1)==H(i)|H(i+1)*H(i+1)==H(i+1)
returns F as the result. You can easily check that it is false. For example, here is the result of a session:

H = [1,%i]
H =

1. i
H(i)*H(i+1)==H(i)|H(i)*H(i+1)==H(i+1)
ans =

T
H(i)*H(i)==H(i)|H(i)*H(i)==H(i+1)
ans =

T
H(i+1)*H(i+1)==H(i)|H(i+1)*H(i+1)==H(i+1)
ans =

F

By hand calculation, you can check that the answer given by Scilab is correct.

Before you write a complicated problem, please do the calculation by hand for simple test cases, and verify that your logic is correct. If your logic is incorrect, no program can give a correct answer.



18-01-16, 6:51 a.m. kannan


Log-in to answer to this question.