# 3.4 The prime factor algorithm

 Page 1 / 1

## General index maps

$n=({K}_{1}{n}_{1}+{K}_{2}{n}_{2})\mod N$ $n=({K}_{3}{k}_{1}+{K}_{4}{k}_{2})\mod N$ ${n}_{1}$

0 1 N 1 1
${k}_{1}$
0 1 N 1 1
${n}_{2}$
0 1 N 2 1
${k}_{2}$
0 1 N 2 1

The basic ideas is to simply reorder the DFT computation to expose the redundancies in the DFT , and exploit these to reduce computation!

Three conditions must be satisfied to make this map serve our purposes

• Each map must be one-to-one from $0$ to $N-1$ , because we want to do the same computation, just in a different order.
• The map must be cleverly chosen so that computation is reduced
• The map should be chosen to make the short-length transforms be DFTs . (Not essential, since fast algorithms for short-length DFT -like computations could be developed, but it makes our work easier.)

## Case i

${N}_{1}$ , ${N}_{2}$ relatively prime (greatest common denominator $1$ ) i.e. $\gcd ({N}_{1}, {N}_{2})=1$

${K}_{1}=a{N}_{2}$ and/or ${K}_{2}=b{N}_{1}$ and $\gcd ({K}_{1}, {N}_{1})=1$ , $\gcd ({K}_{2}, {N}_{2})=1$

## Case ii

${N}_{1}$ , ${N}_{2}$ not relatively prime: $\gcd ({N}_{1}, {N}_{2})> 1$

${K}_{1}=a{N}_{2}$ and ${K}_{2}\neq b{N}_{1}$ and $\gcd (a, {N}_{1})=1$ , $\gcd ({K}_{2}, {N}_{2})=1$ or ${K}_{1}\neq a{N}_{2}$ and ${K}_{2}=b{N}_{1}$ and $\gcd ({K}_{1}, {N}_{1})=1$ , $\gcd (b, {N}_{2})=1$ where ${K}_{1}$ , ${K}_{2}$ , ${K}_{3}$ , ${K}_{4}$ , ${N}_{1}$ , ${N}_{2}$ , $a$ , $b$ integers

Requires number-theory/abstract-algebra concepts. Reference: C.S. Burrus
Conditions of one-to-oneness must apply to both $k$ and $n$

## Conditions for arithmetic savings

$X({k}_{1}, {k}_{2})=\sum_{{n}_{1}=0}^{{N}_{1}-1} \sum_{{n}_{2}=0}^{{N}_{2}-1} x({n}_{1}, {n}_{2}){W}_{N}^{\left({K}_{1}{n}_{1}+{K}_{2}{n}_{2}\right)\left({K}_{3}{k}_{1}+{K}_{4}{k}_{2}}=\sum_{{n}_{1}=0}^{{N}_{1}-1} \sum_{{n}_{2}=0}^{{N}_{2}-1} x({n}_{1}, {n}_{2}){W}_{N}^{{K}_{1}{K}_{3}{n}_{1}{k}_{1}}{W}_{N}^{{K}_{1}{K}_{4}{n}_{1}{k}_{2}}{W}_{N}^{{K}_{2}{K}_{3}{n}_{2}{k}_{1}}{W}_{N}^{{K}_{2}{K}_{4}{n}_{2}{k}_{2}}$
• ${K}_{1}{K}_{4}\mod N=0$ exclusive or ${K}_{2}{K}_{3}\mod N=0$ Common Factor Algorithm (CFA). Then $X(k)={\mathrm{DFT}}_{Ni}(\text{twiddle factors}{\mathrm{DFT}}_{Nj}(x({n}_{1}, {n}_{2})))$
• ${K}_{1}{K}_{4}\mod N$ and ${K}_{2}{K}_{3}\mod N=0$ Prime Factor Algorithm (PFA). $X(k)={\mathrm{DFT}}_{Ni}({\mathrm{DFT}}_{Nj})$ No twiddle factors!
A PFA exists only and always for relatively prime ${N}_{1}()$ , ${N}_{2}()$

## Conditions for short-length transforms to be dfts

${K}_{1}{K}_{3}\mod N={N}_{2}$ and ${K}_{2}{K}_{4}\mod N={N}_{1}$

Convenient choice giving a PFA
${K}_{1}={N}_{2}$ , ${K}_{2}={N}_{1}$ , ${K}_{3}={N}_{2}{N}_{2}^{-1}\mod {N}_{1}\mod {N}_{1}$ , ${K}_{4}={N}_{1}{N}_{1}^{-1}\mod {N}_{2}\mod {N}_{2}$ where ${N}_{1}^{-1}\mod {N}_{2}$ is an integer such that ${N}_{1}{N}_{1}^{-1}\mod =1$

${N}_{1}=3$ , ${N}_{2}=5$ $N=15$ $n=(5{n}_{1}+3{n}_{2})\mod 15$ $k=(10{k}_{1}+6{k}_{2})\mod 15$

• ## Checking conditions for one-to-oneness

$5={K}_{1}=a{N}_{2}=5a$ $3={K}_{2}=b{N}_{1}=3b$ $\gcd (5, 3)=1$ $\gcd (3, 5)=1$ $10={K}_{3}=a{N}_{2}=5a$ $6={K}_{4}=b{N}_{1}=3b$ $\gcd (10, 3)=1$ $\gcd (6, 5)=1$
• ## Checking conditions for reduced computation

${K}_{1}{K}_{4}\mod 15=5\times 6\mod 15=0$ ${K}_{2}{K}_{3}\mod 15=3\times 10\mod 15=0$
• ## Checking conditions for making the short-length transforms be dfts

${K}_{1}{K}_{3}\mod 15=5\times 10\mod 15=5={N}_{2}$ ${K}_{2}{K}_{4}\mod 15=3\times 6\mod 15=3={N}_{1}$
Therefore, this is a prime factor map.

## Operation counts

• ${N}_{2}$ length- ${N}_{1}$ DFTs ${N}_{1}$ length- ${N}_{2}$ DFTs ${N}_{2}{N}_{1}^{2}+{N}_{1}{N}_{2}^{2}=N({N}_{1}+{N}_{2})$ complex multiplies
• Suppose $N={N}_{1}{N}_{2}{N}_{3}{N}_{M}$ $N({N}_{1}+{N}_{2}++{N}_{M})$ Complex multiplies
radix-2 , radix-4 eliminate all multiplies in short-length DFTs, but have twiddle factors: PFA eliminates all twiddlefactors, but ends up with multiplies in short-length DFTs . Surprisingly, total operation counts end up being very similarfor similar lengths.

#### Questions & Answers

are nano particles real
Missy Reply
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
Lale Reply
no can't
Lohitha
where we get a research paper on Nano chemistry....?
Maira Reply
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
Google
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
revolt
da
Application of nanotechnology in medicine
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
Jyoti Reply
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
Berger describes sociologists as concerned with
Mueller Reply
what is hormones?
Wellington
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

### Read also:

#### Get Jobilize Job Search Mobile App in your pocket Now!

Source:  OpenStax, The dft, fft, and practical spectral analysis. OpenStax CNX. Feb 22, 2007 Download for free at http://cnx.org/content/col10281/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'The dft, fft, and practical spectral analysis' conversation and receive update notifications?

 By Richley Crapo By OpenStax By Ann Schlosser By OpenStax By David Bourgeois By Richley Crapo By Robert Murphy By OpenStax By Kimberly Nichols By Karen Gowdey