d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need To Write A Fortran Program > To Verify A Mathematical Formula
12Next
Add Reply New Topic New Poll
Member
Posts: 8,205
Joined: Dec 18 2008
Gold: 5.20
Jan 23 2013 09:18pm

Write a computer code (in Fortran or another language) to check the identity

εijkεpqk = δipδjq - δiqδjp

where i, j, k, p, q are subscripts (with values from 1, 2, and 3, hence 81 total possible values, and k is the free variable)

for all 81 possible values of i,j,p,q. The program should include
function subroutines for computing epsilon(i,j,k) and delta(i,j).
Using the epsilon function subroutine, also compute εijkεijk.

Lab report should include a description of the purpose of the code,
the code itself including comment statements, a short user
guide, plus output and an explanation of the output. Grading will
include a component for elegance and efficiency of the code and
output.

If anyone can help me, that would be very awesome.
Member
Posts: 8,205
Joined: Dec 18 2008
Gold: 5.20
Jan 24 2013 01:22pm
Anybody please?
Member
Posts: 8,205
Joined: Dec 18 2008
Gold: 5.20
Jan 25 2013 01:05pm
BUMP
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jan 25 2013 03:56pm
only 5-8 regulars frequent this subforum of which i only know like 4 that actually know how to program. if no one answers its basically because we are lazy or dont feel like helping. and the bumping doesnt really make us help anyone more after all posts dont get off of the first page until weeks after posting.
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Jan 26 2013 02:31am
maybe i'm missing something but for the basic logic why can't you just do this with 4 nested loops. I know its sloppy, but should work. Something like this (python):

Code
for i in range(1,4):
    for j in range(1,4):
         for p in range(1,4):
              for q in range(1,4):
                   print "You will reach this point 81 times, each time with one of the unique allowed combinations of the above variables. Do your checks here"


This post was edited by Azrad on Jan 26 2013 02:34am
Member
Posts: 8,205
Joined: Dec 18 2008
Gold: 5.20
Jan 26 2013 05:02pm
Quote (AbDuCt @ Jan 25 2013 01:56pm)
only 5-8 regulars frequent this subforum of which i only know like 4 that actually know how to program. if  no one answers its basically because we are lazy or dont feel like helping. and the bumping doesnt really make us help anyone more after all posts dont get off of the first page until weeks after posting.


I appreciate the reply. Can someone help? Please?
Member
Posts: 28,331
Joined: Jun 9 2007
Gold: 11,700.00
Jan 27 2013 09:19pm
where do you get the functions epsilon and delta from?
maybe you have a standard definition in your curriculum

otherwise it looks pretty simple to do in fortran v

@azrad - you misread it seems, loop-counter would have to be (1,3) and not (1,4)
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jan 27 2013 09:27pm
i haven't bothered because 1) i dont know fortran and 2) if he's allowed to pick any language he wants, i dont know why he would pick fortran if he doesn't know it either
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jan 28 2013 02:18am
Quote (carteblanche @ Jan 27 2013 10:27pm)
i haven't bothered because 1) i dont know fortran and 2) if he's allowed to pick any language he wants, i dont know why he would pick fortran if he doesn't know it either


cs hipster
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Jan 28 2013 03:17am
Quote (brmv @ Jan 27 2013 08:19pm)
@azrad - you misread it seems, loop-counter would have to be (1,3) and not (1,4)
i totally understand why you said that, but in python that is not how it works...
here is a snippet with its output:
http://python.codepad.org/3pGNDUJ8

This post was edited by Azrad on Jan 28 2013 03:19am
Go Back To Programming & Development Topic List
12Next
Add Reply New Topic New Poll