Where do postings with automatic account determination occur in SAP Materials Management? There are 3 correct answers to this question.()
B.Inventory management
C.Requisition creation
D.Material requirements planning
E.Invoice verification
B.Inventory management
C.Requisition creation
D.Material requirements planning
E.Invoice verification
0-1背包问题可以描述为:有n个物品,对i=1,2,…,n,第i个物品价值为vi ,重量为wi(vi,和wi为非负数),背包容量为W(W为非负数),选择其中一些物品装入背包,使装入背包物品的总价值最大,,且总重量不超过背包容量,即,其中,xi∈{0,1},xi=0表示第i个物品不放入背包,xi=1表示第i个物品 放入背包。
【问题1】(8分)
用回溯法求解此0-1背包问题,请填充下面伪代码中(1)~(4)处空缺。
回溯法是一种系统的搜索方法。在确定解空间后,回溯法从根结点开始,按照深度优先策略遍历解空间树,搜索满足约束条件的解。对每一个当前结点,若扩展该结点己经不满足约束条件,则不再继续扩展。为了进一步提高算法的搜索效率,往往需要设计一个限界函数,判断并剪枝那些即使扩展了也不能得到最优解的结点。现在假设已经设计了BOUND(v,w,k,W)函数,其中v, w, k和W分别表示当前已经获得的价值、当前背包的重量、己经确定是否选择的物品数和背包的总容量。对应于搜索树中的某个结点,该函数值表示确定了部分物品是否选择之后,对剩下的物品在满足约束条件的前提下进行选择可能获得的最大价值,若该价值小于等于当前已经得到的最优解,则该结点无需再扩展。
下面给出0-1背包问题的回溯算法伪代码。
函数参数说明如下:
W:背包容量;n:物品个数;w:重量数组;v:价值数组;fw:获得最大价值时背包的重量;fp:背包获得的最大价值;X:问题的最优解。
变量说明如下:
cw:当前的背包重量;cp:当前获得的价值;k:当前考虑的物品编号;Y:当前已获得的部分解。
BKNAP(W,n,w,v,fw,fp,X)
1 cw ← cp ← 0
2 (1)
3 fp ← -1
4 while true
5 while k≤n and cw+w[k]≤W do
6 (2)
7 cp ← cp+v[k]
8 Y[k]← 1
9 k ← k+1
10 if k>n then
11 if fp<cp then
12 fp ← cp
13 fw ← ew
14 k ← n
15 X ← Y
16 else Y(k)← 0
17 while BOUND(cp,cw,k,W) ≤fp do
18 while k≠0 and Y(k)≠1 do
19 (3)
20 if k=0 then return
21 Y[k]←0
22 cw ← cw ← w[k]
23 cp ← cp ← v[k]
24 (4)
A.If a purchase requisition is created, the current moving average price is proposed as the valuation price
B.The moving average price is equal to the total value multiplied by total quantity of stock
C.Goods receipts are always valuated based on the moving average price from the material master record
D.Price difference postings can happen when posting an invoice receipt
A.intruders
B.terminals
C.hosts
D.users@@@SXB@@@A.exterior
B.internal
C.centre
D.middle@@@SXB@@@A.attack
B.collapse
C.breakdown
D.virus@@@SXB@@@A.users
B.campuses
C.Companies
D.networks@@@SXB@@@A.safeguards
B.businesses
C.experiences
D.Resources
In most projects, the first system built is(71) usable. Itmay be too slow, too big, awkward to use, or all three. There is no (72) but to startagain, smarting but smarter, and build a redesigned version in which theseproblems are solved. The discard and (73) may be done in one lump, or it may be done piece-by-piece. But alllarge-system experience shows that it will be done. Where a new system conceptor new technology is used, one has to build a system to throw away, for eventhe best planning is not so omniscient (全知的) as to get it right the first time.
The management question, therefore, is notwhether to build a pilot system and throw it away. You will do that. The onlyquestion is whether to plan in advance to build a (74) , or topromise to deliver the throwaway to customers. Seen this way, the answer ismuch clearer. Delivering that throwaway to customers buys time, but it does soonly at the (75) of agony (极大痛苦)for the user, distraction for the builders while they do theredesign, and a bad reputation for the product that the best redesign will findhard to live down.
Hence plan to throw one away; you will,anyhow.
(71)
A.almost
B.often
C.usually
D.barely
The analysis phase answers the questions of who will use the system, what the system will do, and where and when it will be used. During this phase, the project team investigates ny current system,identifies (71) , and develops a concept for the new system. This phase as three steps: first, (72) is developed to guide the project team's efforts. It usually ncludes an analysis of the current system and its problems, and the ways to design a new ystem. The next step is (73) The analysis ofthis information - in conjunction withinput rom the project sponsor and many other people - leads to the development of a concept for a ew system. The system concept is then used as a basis to develop a set ofbusiness analysis odels that describes how the business will operate if the new system were developed. The set of models typically includes models that represent the (74) necessary to support the nderlying business process. Last, the analyses, system concepts, and models are combined nto a document called the (75), which is presented to the project sponsor and other key ecision makers that decide whether the project should continue to move forward
A.improvementopportunities
B.logicalmodel
C.systemrequirements
D.systemarchitecture@@@SXB@@@A.a user manual
B.an analysis strategy
C. an analysis use case
D.a design user case@@@SXB@@@A.project scope definition
B.prob,lems analysis
C.decisionanalysis
D.requirementsgathering@@@SXB@@@A.dataandprocesses
B.systeminfrastructures
C.externalagents
D.systemsoftware@@@SXB@@@A.requirementsstatement
B.designspecification
C.systemproposal
D.project charter
A.System logical modelingB.use case modelingC.requirements modelingD.application modeling A.systems planning phaseB.systems modeling phaseC.systems analysis phaseD.systems design phase A.system charterB.system scope definitionC.system blueprintD.system requirement document A.application architectureB.system data modelC.system process modelD.implement environment A.system architecture descriptionB.system design specificationC.system technique architectureD.physical deployment architecture
A.the largest
B.the second largest
C.the third largest
D.the fourth largest
【问题1】(7分) 引入两个伪指令:a= R(X)表示将在库数量X值读入到变量a中;W(a,X)表示将变量a的值写入到在库数量X中。入库操作用下标I表示,出库操作用下标O表示。 将出库和八库操作分别定义为两个事务,针对并发序列:ao=Ro(X),aI=RI(X),ao=ao -1,Wo(ao, X),aI- aI+1,WI(aI,X)。其中变量ai和ao分别代表入库事务和出库事务中的局部变量。 (1)假设当前X的值为3,则执行完上述并发序列的伪指令后,X的值是多少?简述产生这一错误的原因(100字以内)。 (2)为了解决上述问题,引入独占锁指令XLock(X)对数据X进行加锁,解锁指令Unlock(X)两对数据X进行解锁。入库操作用下标I表示,如XLockI(X);出库操作用下标O表示,如Unlocko(X)。请根据上述的并发序列,给出一种可能的执行序列,使其满足2PL协议。 【问题2】(8分) 下面是用SQL实现的出入库业务程序的一部分,请补全空缺处的代码。 CREATE PROCEDURE IOstack(IN BookNo VARCHAR(20), IN Amount INT){ //输入合法性验证 if not(Amount=1 or Amount=-1) return -1; //修改图书表当前位置 UPDATE 图书 SET 当前位置=GetPos(BookNo,Amount)//系统生成 WHERE (a) ; if error then {ROLLBACK;return -2;} //修改在库数量 UPDATE 书目 SET 在库数量= (b) WHERE EXISTS(SELECT * FROM 图书 WHERE 书号=BookNo AND (c) ); if error then {ROLLBACK;return -3;} (d) ; return 0; }
试题(71)~(75)
The analysis phase answers the questions of who will use the system, what the system will do, and where and when it will be used. During this phase, the project team investigates ny current system,identifies (71) , and develops a concept for the new system. This phase as three steps: first, (72) is developed to guide the project team's efforts. It usually ncludes an analysis of the current system and its problems, and the ways to design a new ystem. The next step is (73) The analysis ofthis information - in conjunction withinput rom the project sponsor and many other people - leads to the development of a concept for a ew system. The system concept is then used as a basis to develop a set ofbusiness analysis odels that describes how the business will operate if the new system were developed. The set of models typically includes models that represent the (74) necessary to support the nderlying business process. Last, the analyses, system concepts, and models are combined nto a document called the (75), which is presented to the project sponsor and other key ecision makers that decide whether the project should continue to move forward.
(71) A. improvementopportunities
B. logicalmodel
C. systemrequirements
D. systemarchitecture
(72) A. a user manual
B. an analysis strategy
C. an analysis use case
D. a design user case
(73) A. project scope definition
B. prob,lems analysis
C. decisionanalysis
D. requirementsgathering
(74) A. dataandprocesses
B. systeminfrastructures
C. externalagents
D. systemsoftware
(75) A. requirementsstatement
B. designspecification
C. systemproposal
D. project charter
试题五(共15 分)
阅读下列说明,回答问题1至问题3,将解答填入答题纸的对应栏内。
【说明】
某航空售票系统负责所有本地起飞航班的机票销售,并设有多个机票销售网点。各售票网点使用相同的售票程序。假设售票程序中用到的伪指令如下表5-1所示:
假设某售票网点一次售出a张航班A 的机票,则售票程序的伪指令序列为: R (A, x); W (A, x – a)。根据上述业务及规则,完成下列问题:
【问题1】(5 分)
若两个售票网点同时销售航班A的机票,在数据库服务器端可能出现如下的调度:
A:R1(A, x),R2(A, x),W1(A, x – 1),W2(A, x – 2);
B:R1(A, x),R2(A, x),W2(A, x – 2),W1(A, x – 1);
C:R1(A, x),W1(A, x – 1),R2(A, x),W2(A, x – 2);
其中Ri(A, x),Wi(A, x)分别表示第i个销售网点的读写操作,其余类同。
假设当前航班 A 剩余 10 张机票,分析上述三个调度各自执行完后的剩余票数,并指出错误的调度及产生错误的原因。
【问题2】(6 分)
(1)判定事务并发执行正确性的准则是什么?如何保证并发事务正确地执行?
(2) 引入相应的加解锁指令,重写售票程序的伪指令序列,以保证正确的并发调度。
【问题3】(4 分)
下面是用E-SQL实现的机票销售程序的一部分,请补全空缺处的代码。
EXEC SQL SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
EXEC SQL SELECT balance INTO :x FROM tickets WHERE flight = ‘A’ ;
printf("航班A 当前剩余机票数为:%d\n请输入购票数:", x );
scanf("%d", &a);
x = x – a ;
if (x<0)
EXEC SQL ROLLBACK WORK;
printf("票数不够,购票失败!");
else{
EXEC SQL UPDATE tickets SET (a) ;
if (SQLCA.sqlcode <> SUCCESS)
EXEC SQL ROLLBACK WORK;
else
(b) ;
}