Nurmalitaseptiani's Blog

Tugas 3 Pengantar Struktur Data

Posted on: Mei 4, 2010

UBAH BENTUK INFIX DI BAWAH INI KE DALAM BENTUK PREFIX :

1. A+(B*C-(D/E*F)*G)*H

  • Jawab :

/DE*F

*/DEF

B*C-*/DEF

*BC-*/DEF

-*BC*/DEF

-*BC*/DEF*G

*-*BC*/DEFG

*-*BC*/DEFG

A+*-*BC*/DEFG*H

+A*-*BC*/DEFG*H

*+A*-*BC*/DEFGH

2. ((A+B)/A)^((E-F)*G)

  • Jawab :

+AB/A

/+ABA

-EF*G

*-EFG

/+ABA^*-EFG

^/+ABA*-EFG

UBAH KE DALAM BENTUK POSTFIX :

1. A+B-(C+D)-(E-F)+F/H^I

  • Jawab :

C+D

CD+

E-F

EF-

CD+-EF-

CD+EF–

A*B

AB*

AB*-CD+EF–

AB*CD+EF—

AB*CD+EF—^I

AB*CD+EF—I^

AB*CD+EF—I^/H

AB*CD+EF—I^H/

AB*CD+EF—I^H/+F

AB*CD+EF—I^H/F+
2. A*(B+D)/E-F*(G+H/K)

  • Jawab :

B+D

BD+

G+H/K

GH+K/

A*BD+/E

ABD+*

ABD+*E/

F*GH+K/

FGH+K/*

ABD+*E/-FGH+K/*

ABD+*E/FGH+/*-

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: